Function at 0x1037641
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x104081f
call fcn.0103cb58
sub esp, 0xb0
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov edi, ecx
mov dword [ebp - 0x38], edi
xor ebx, ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x14], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebp - 0x40], eax
lea esi, [edi + 0xe8]
mov ecx, esi
call fcn.01029ed9
mov ecx, eax
call fcn.010279aa
mov dword [ebp - 0x1c], eax
mov ecx, esi
call fcn.01029ef1
mov ecx, eax
call fcn.01015fd2
mov dword [ebp - 0x3c], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x34], ebx
mov byte [ebp - 4], 1
mov dword [ebp - 0x50], ebx
push 0x1ffe
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov esi, eax
mov dword [ebp - 0xa0], esi
mov dword [ebp - 0x50], esi
cmp esi, ebx
je 0x1037700
mov dword [ebp - 0x88], ebx
push dword [sym.imp.msvcrt.dll__iob]
push 0xffe
push esi
call dword [sym.imp.msvcrt.dll_fgetws]
add esp, 0xc
mov dword [ebp - 0x88], eax
cmp eax, ebx
jne 0x1037742
mov dword [ebp - 0xb8], esi
push esi
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
mov dword [ebp - 0x50], ebx
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push 0x1005cf4
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x18], eax
cmp eax, 0xffffffff
jne 0x10377c9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x84], eax
push 0x1042d04
lea eax, [ebp - 0x84]
jmp 0x1037c7f
push 0x1006460
lea ecx, [ebp - 0x74]
call fcn.01007afe
mov edi, eax
mov byte [ebp - 4], 2
push esi
lea ecx, [ebp - 0x64]
call fcn.01007b57
mov byte [ebp - 4], 3
push edi
lea ecx, [ebp - 0x6c]
push ecx
mov ecx, eax
call fcn.010084dd
mov byte [ebp - 4], 4
push eax
lea ecx, [ebp - 0x34]
call fcn.01008489
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x6c]
cmp ecx, ebx
je 0x103778e
call fcn.01008084
mov dword [ebp - 0x6c], ebx
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x64]
cmp ecx, ebx
je 0x10377a1
call fcn.01008084
mov dword [ebp - 0x64], ebx
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x74]
cmp ecx, ebx
je 0x10377b4
call fcn.01008084
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x94], esi
push esi
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
mov edi, dword [ebp - 0x38]
jmp 0x10376ae
lea eax, [ebp - 0x24]
push eax
push 0x100722c
push 1
push ebx
push 0x100720c
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x1c], ebx
jne 0x10377ed
cmp dword [ebp - 0x3c], ebx
je 0x1037852
lea ecx, [ebp - 0x54]
call sub.framedyn.dll_public:_void___thiscall_CHString::constructor_void_
mov byte [ebp - 4], 5
push 0x1004e08
lea eax, [ebp - 0x54]
push eax
call sub.framedyn.dll_public:_void___cdecl_CHString::Format_unsigned_short_int_const__
pop ecx
pop ecx
push ebx
push ebx
push dword [ebp - 0x1c]
lea eax, [edi + 0xe8]
push eax
push dword [ebp - 0x40]
push ecx
mov ecx, esp
mov dword [ebp - 0xb0], esp
push dword [ebp - 0x54]
call fcn.01007b57
mov byte [ebp - 4], 6
mov esi, 0x1006348
push esi
push 0x83b
push dword [ebp - 0x20]
mov byte [ebp - 4], 5
call fcn.01033e5c
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x54]
call sub.framedyn.dll_public:_void___thiscall_CHString::destructor_void_
jmp 0x1037857
mov esi, 0x1006348
cmp dword [ebp - 0x20], ebx
jge 0x1037864
push dword [ebp - 0x20]
call fcn.0103c827
mov dword [ebp - 0x60], ebx
mov eax, dword [ebp - 0x34]
cmp eax, ebx
je 0x1037875
mov eax, dword [eax]
mov dword [ebp - 0x5c], eax
jmp 0x1037878
mov dword [ebp - 0x5c], ebx
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax]
lea edx, [ebp - 0x60]
push edx
push dword [ebp - 0x5c]
push eax
call dword [ecx + 0x104]
mov dword [ebp - 0x20], eax
cmp eax, ebx
jl 0x1037c35
cmp word [ebp - 0x60], bx
je 0x1037c35
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax]
lea edx, [ebp - 0x2c]
push edx
push eax
call dword [ecx + 0xb4]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x1c], ebx
jne 0x10378bd
cmp dword [ebp - 0x3c], ebx
je 0x10378f5
push ebx
push ebx
push dword [ebp - 0x1c]
add edi, 0xe8
push edi
push dword [ebp - 0x40]
push ecx
mov ecx, esp
mov dword [ebp - 0xa8], esp
push 0x1004c38
call fcn.01007b57
mov byte [ebp - 4], 7
push esi
push 0x852
push dword [ebp - 0x20]
mov byte [ebp - 4], 1
call fcn.01033e5c
cmp dword [ebp - 0x20], ebx
jge 0x1037902
push dword [ebp - 0x20]
call fcn.0103c827
cmp dword [ebp - 0x2c], ebx
je 0x1037bbf
push 0x1006448
lea ecx, [ebp - 0x68]
call fcn.01007b57
mov dword [ebp - 0x98], eax
mov byte [ebp - 4], 8
mov eax, dword [eax]
cmp eax, ebx
je 0x103792c
mov ecx, dword [eax]
jmp 0x103792e
xor ecx, ecx
mov eax, dword [ebp - 0x2c]
mov edx, dword [eax]
lea edi, [ebp - 0x28]
push edi
push ecx
push eax
call dword [edx + 0xc8]
mov edi, eax
mov dword [ebp - 0x20], edi
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x68]
cmp ecx, ebx
je 0x1037957
call fcn.01008084
mov dword [ebp - 0x68], ebx
cmp dword [ebp - 0x1c], ebx
jne 0x1037961
cmp dword [ebp - 0x3c], ebx
je 0x1037999
push ebx
push ebx
push dword [ebp - 0x1c]
mov eax, dword [ebp - 0x38]
add eax, 0xe8
push eax
push dword [ebp - 0x40]
push ecx
mov ecx, esp
mov dword [ebp - 0x9c], esp
push 0x10063d8
call fcn.01007b57
mov byte [ebp - 4], 9
push esi
push 0x85e
push edi
mov byte [ebp - 4], 1
call fcn.01033e5c
cmp edi, ebx
jge 0x10379a3
push edi
call fcn.0103c827
mov dword [ebp - 0x70], ebx
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
lea edx, [ebp - 0x70]
push edx
push eax
call dword [ecx + 0x20]
mov edi, eax
mov dword [ebp - 0x20], edi
cmp dword [ebp - 0x1c], ebx
jne 0x10379c2
cmp dword [ebp - 0x3c], ebx
je 0x10379fa
push ebx
push ebx
push dword [ebp - 0x1c]
mov eax, dword [ebp - 0x38]
add eax, 0xe8
push eax
push dword [ebp - 0x40]
push ecx
mov ecx, esp
mov dword [ebp - 0xa4], esp
push 0x1004b84
call fcn.01007b57
mov byte [ebp - 4], 0xa
push esi
push 0x868
push edi
mov byte [ebp - 4], 1
call fcn.01033e5c
cmp edi, ebx
jge 0x1037a04
push edi
call fcn.0103c827
mov dword [ebp - 0x44], ebx
mov eax, dword [ebp - 0x44]
cmp eax, dword [ebp - 0x70]
mov eax, dword [ebp - 0x28]
jge 0x1037ba2
mov ecx, dword [eax]
lea edx, [ebp - 0x30]
push edx
push dword [ebp - 0x44]
push eax
call dword [ecx + 0x1c]
mov edi, eax
mov dword [ebp - 0x20], edi
cmp dword [ebp - 0x1c], ebx
jne 0x1037a32
cmp dword [ebp - 0x3c], ebx
je 0x1037a6a
push ebx
push ebx
push dword [ebp - 0x1c]
mov eax, dword [ebp - 0x38]
add eax, 0xe8
push eax
push dword [ebp - 0x40]
push ecx
mov ecx, esp
mov dword [ebp - 0xac], esp
push 0x1004b44
call fcn.01007b57
mov byte [ebp - 4], 0xb
push esi
push 0x873
push edi
mov byte [ebp - 4], 1
call fcn.01033e5c
cmp edi, ebx
jge 0x1037a74
push edi
call fcn.0103c827
mov eax, dword [ebp - 0x30]
cmp eax, ebx
je 0x1037b9a
mov ecx, dword [eax]
lea edx, [ebp - 0x14]
push edx
push eax
call dword [ecx + 0x68]
mov edi, eax
mov dword [ebp - 0x20], edi
cmp dword [ebp - 0x1c], ebx
jne 0x1037a98
cmp dword [ebp - 0x3c], ebx
je 0x1037ad0
push ebx
push ebx
push dword [ebp - 0x1c]
mov eax, dword [ebp - 0x38]
add eax, 0xe8
push eax
push dword [ebp - 0x40]
push ecx
mov ecx, esp
mov dword [ebp - 0xb4], esp
push 0x1004b10
call fcn.01007b57
mov byte [ebp - 4], 0xc
push esi
push 0x87f
push edi
mov byte [ebp - 4], 1
call fcn.01033e5c
cmp edi, ebx
jge 0x1037ada
push edi
call fcn.0103c827
push dword [ebp - 0x14]
lea ecx, [ebp - 0x48]
call fcn.01007b57
mov byte [ebp - 4], 0xd
mov ecx, dword [ebp - 0x48]
cmp ecx, ebx
je 0x1037af9
call fcn.01015c3b
mov edi, eax
jmp 0x1037afb
xor edi, edi
push ebx
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x48]
call fcn.01007bc5
push eax
push edi
push dword [ebp - 0x18]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
call edi
mov dword [ebp - 0x80], eax
cmp eax, ebx
jne 0x1037b38
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x8c], eax
push 0x1042d04
lea eax, [ebp - 0x8c]
jmp 0x1037c7f
push ebx
lea eax, [ebp - 0x58]
push eax
push 1
push 0x1006460
push dword [ebp - 0x18]
call edi
mov dword [ebp - 0x80], eax
cmp eax, ebx
jne 0x1037b66
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x7c], eax
push 0x1042d04
lea eax, [ebp - 0x7c]
jmp 0x1037c7f
cmp dword [ebp - 0x14], ebx
je 0x1037b77
push dword [ebp - 0x14]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov dword [ebp - 0x14], ebx
mov eax, dword [ebp - 0x30]
cmp eax, ebx
je 0x1037b87
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebp - 0x30], ebx
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x48]
cmp ecx, ebx
je 0x1037b9a
call fcn.01008084
mov dword [ebp - 0x48], ebx
inc dword [ebp - 0x44]
jmp 0x1037a07
cmp eax, ebx
je 0x1037baf
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebp - 0x28], ebx
mov eax, dword [ebp - 0x2c]
cmp eax, ebx
je 0x1037bbf
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebp - 0x2c], ebx
mov eax, dword [ebp - 0x24]
cmp eax, ebx
je 0x1037bcf
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebp - 0x24], ebx
cmp dword [ebp + 8], ebx
je 0x1037bdd
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x18], ebx
je 0x1037beb
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [sym.imp.msvcrt.dll__iob]
push 0x10054f0
push 0x10063c8
call dword [sym.imp.msvcrt.dll__wfreopen]
add esp, 0xc
mov dword [ebp - 0x4c], 1
mov byte [ebp - 4], bl
mov ecx, dword [ebp - 0x34]
cmp ecx, ebx
je 0x1037c1d
call fcn.01008084
mov dword [ebp - 0x34], ebx
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret 4
cmp dword [ebp - 0x34], ebx
je 0x1037c46
mov ecx, dword [ebp - 0x34]
call fcn.01015c3b
mov esi, eax
jmp 0x1037c48
xor esi, esi
push ebx
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x34]
call fcn.01007bc5
push eax
push esi
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1037bcf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x90], eax
push 0x1042d04
lea eax, [ebp - 0x90]
push eax
call sub.msvcrt.dll__CxxThrowException
mov eax, dword [ebp - 0x24]
xor ebx, ebx
cmp eax, ebx
je 0x1037c97
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebp - 0x24], ebx
mov eax, dword [ebp - 0x2c]
cmp eax, ebx
je 0x1037ca7
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebp - 0x2c], ebx
mov eax, dword [ebp - 0x30]
cmp eax, ebx
je 0x1037cb7
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebp - 0x30], ebx
mov eax, dword [ebp - 0x28]
cmp eax, ebx
je 0x1037cc7
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebp - 0x28], ebx
cmp dword [ebp - 0x14], ebx
je 0x1037cd8
push dword [ebp - 0x14]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov dword [ebp - 0x14], ebx
cmp dword [ebp + 8], ebx
je 0x1037ce6
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x18], ebx
je 0x1037cf4
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x38]
lea edi, [esi + 0xe8]
push dword [ebp - 0xbc]
mov ecx, edi
call fcn.01029ed1
mov ecx, eax
call fcn.01013259
mov dword [ebp - 0x4c], ebx
push 1
push edi
lea ecx, [esi + 0x64]
call fcn.01026dc5
mov eax, 0x1037c1d
ret