Function at 0x40d280
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa4
mov eax, dword [0x46d040]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x60], 0xffffffff
mov eax, dword [ebp - 0x60]
cmp eax, dword [ebp + 8]
jne 0x40d2ae
mov dword [ebp - 0x4c], 1
jmp 0x40d2b5
mov dword [ebp - 0x4c], 0
mov cl, byte [ebp - 0x4c]
mov byte [ebp - 0x3e], cl
movzx edx, byte [ebp - 0x3e]
test edx, edx
je 0x40d31d
mov dword [ebp - 0x90], 0xffffffff
mov eax, dword [ebp - 0x90]
cmp dword [ebp + 8], eax
je 0x40d2e0
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x54], ecx
jmp 0x40d309
mov dword [ebp - 0x88], 0xffffffff
cmp dword [ebp - 0x88], 0
jne 0x40d2fc
mov dword [ebp - 0x50], 1
jmp 0x40d303
mov dword [ebp - 0x50], 0
mov edx, dword [ebp - 0x50]
mov dword [ebp - 0x54], edx
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0xa0], eax
mov eax, dword [ebp - 0xa0]
jmp 0x40d525
mov ecx, dword [ebp - 0x38]
mov edx, dword [ecx + 0x20]
mov eax, dword [edx]
mov dword [ebp - 0x64], eax
cmp dword [ebp - 0x64], 0
je 0x40d3a7
mov ecx, dword [ebp - 0x38]
mov edx, dword [ecx + 0x20]
mov eax, dword [edx]
mov dword [ebp - 0x6c], eax
mov ecx, dword [ebp - 0x38]
mov edx, dword [ecx + 0x20]
mov eax, dword [ebp - 0x38]
mov ecx, dword [eax + 0x30]
mov edx, dword [edx]
add edx, dword [ecx]
mov dword [ebp - 0x68], edx
mov eax, dword [ebp - 0x68]
cmp dword [ebp - 0x6c], eax
jae 0x40d3a7
mov cl, byte [ebp + 8]
mov byte [ebp - 0x39], cl
mov dl, byte [ebp - 0x39]
mov byte [ebp - 0x3a], dl
mov eax, dword [ebp - 0x38]
mov ecx, dword [eax + 0x30]
mov edx, dword [ecx]
sub edx, 1
mov eax, dword [ebp - 0x38]
mov ecx, dword [eax + 0x30]
mov dword [ecx], edx
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + 0x20]
mov ecx, dword [eax]
mov dword [ebp - 0x70], ecx
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + 0x20]
mov ecx, dword [eax]
add ecx, 1
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + 0x20]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x70]
mov dword [ebp - 0x74], ecx
mov edx, dword [ebp - 0x74]
mov al, byte [ebp - 0x3a]
mov byte [edx], al
mov eax, dword [ebp + 8]
jmp 0x40d525
mov ecx, dword [ebp - 0x38]
cmp dword [ecx + 0x4c], 0
jne 0x40d3bf
mov dword [ebp - 0x78], 0xffffffff
mov eax, dword [ebp - 0x78]
jmp 0x40d525
mov ecx, dword [ebp - 0x38]
call fcn.0040f8b0
nop
mov edx, dword [ebp - 0x38]
cmp dword [edx + 0x38], 0
jne 0x40d415
mov eax, dword [ebp - 0x38]
mov ecx, dword [eax + 0x4c]
mov dword [ebp - 0x7c], ecx
mov dl, byte [ebp + 8]
mov byte [ebp - 0x3b], dl
mov al, byte [ebp - 0x3b]
mov byte [ebp - 0x3c], al
mov edx, dword [ebp - 0x7c]
mov cl, byte [ebp - 0x3c]
call fcn.00402370
movzx ecx, al
test ecx, ecx
je 0x40d400
mov edx, dword [ebp + 8]
mov dword [ebp - 0x58], edx
jmp 0x40d40d
mov dword [ebp - 0x80], 0xffffffff
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
jmp 0x40d525
mov dword [ebp - 0xa4], 0x20
mov cl, byte [ebp + 8]
mov byte [ebp - 0x3d], cl
mov dl, byte [ebp - 0x3d]
mov byte [ebp - 0x2a], dl
mov eax, dword [ebp - 0x38]
mov ecx, dword [eax + 0x38]
mov dword [ebp - 0x84], ecx
lea edx, [ebp - 0x30]
push edx
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0x28]
push ecx
lea edx, [ebp - 0x34]
push edx
lea eax, [ebp - 0x29]
push eax
lea ecx, [ebp - 0x2a]
push ecx
mov edx, dword [ebp - 0x38]
add edx, 0x40
push edx
mov ecx, dword [ebp - 0x84]
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0
je 0x40d47c
cmp dword [ebp - 0x44], 1
je 0x40d47c
cmp dword [ebp - 0x44], 3
je 0x40d4e0
jmp 0x40d515
mov eax, dword [ebp - 0x30]
lea ecx, [ebp - 0x28]
sub eax, ecx
mov dword [ebp - 0x48], eax
je 0x40d4ba
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + 0x4c]
push eax
mov ecx, dword [ebp - 0x48]
push ecx
push 1
lea edx, [ebp - 0x28]
push edx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp dword [ebp - 0x48], eax
je 0x40d4ba
mov dword [ebp - 0x8c], 0xffffffff
mov eax, dword [ebp - 0x8c]
jmp 0x40d525
mov eax, dword [ebp - 0x38]
mov byte [eax + 0x3d], 1
lea ecx, [ebp - 0x2a]
cmp dword [ebp - 0x34], ecx
je 0x40d4ce
mov eax, dword [ebp + 8]
jmp 0x40d525
mov dword [ebp - 0x94], 0xffffffff
mov eax, dword [ebp - 0x94]
jmp 0x40d525
mov edx, dword [ebp - 0x38]
mov edx, dword [edx + 0x4c]
mov cl, byte [ebp - 0x2a]
call fcn.00402370
movzx eax, al
test eax, eax
je 0x40d4fd
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x5c], ecx
jmp 0x40d510
mov dword [ebp - 0x98], 0xffffffff
mov edx, dword [ebp - 0x98]
mov dword [ebp - 0x5c], edx
mov eax, dword [ebp - 0x5c]
jmp 0x40d525
mov dword [ebp - 0x9c], 0xffffffff
mov eax, dword [ebp - 0x9c]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045caa8
mov esp, ebp
pop ebp
ret 4