Function at 0x409be0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x18], edi
mov eax, dword [edi + 0x98]
test eax, eax
je 0x409c85
cmp byte [edi + 1], 0
je 0x409c85
mov byte [eax], 0
mov esi, dword [edi + 0x98]
test esi, esi
je 0x409c85
mov ecx, esi
call fcn.004202b0
mov ecx, dword [esi + 0x54]
test ecx, ecx
je 0x409c38
mov eax, dword [0x4598f8]
test eax, eax
je 0x409c32
dec dword [eax + 0x370]
push ecx
call ebx
add esp, 4
mov ecx, dword [esi + 0x48]
test ecx, ecx
je 0x409c54
mov eax, dword [0x4598f8]
test eax, eax
je 0x409c4e
dec dword [eax + 0x370]
push ecx
call ebx
add esp, 4
mov ecx, dword [esi + 0x3c]
test ecx, ecx
je 0x409c70
mov eax, dword [0x4598f8]
test eax, eax
je 0x409c6a
dec dword [eax + 0x370]
push ecx
call ebx
add esp, 4
mov eax, dword [0x4598f8]
test eax, eax
je 0x409c7f
dec dword [eax + 0x370]
push esi
call ebx
add esp, 4
cmp byte [edi], 0
mov dword [edi + 0x98], 0
je 0x40a465
cmp byte [edi + 0x2df5], 0
je 0x409d05
mov esi, dword [edi + 0x20]
test esi, esi
je 0x409d05
mov eax, dword [0x4598f8]
lea ecx, [ebp - 4]
mov dword [ebp - 0xc], eax
mov dword [0x4598f8], edi
mov dword [edi + 0x2df8], 0
mov dword [ebp - 4], 0
call fcn.00414f40
mov edx, 0x43a79c
mov dword [ebp - 0x10], eax
mov ecx, esi
call fcn.00405e70
mov esi, eax
test esi, esi
je 0x409cfd
push esi
push dword [ebp - 4]
push 1
push dword [ebp - 0x10]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0x14
mov eax, dword [ebp - 0xc]
mov dword [0x4598f8], eax
xor esi, esi
cmp dword [edi + 0x2e20], esi
jle 0x409d3d
xor ecx, ecx
mov dword [ebp - 4], ecx
mov eax, dword [edi + 0x2e28]
add eax, ecx
cmp dword [eax], 6
jne 0x409d2e
push eax
mov eax, dword [eax + 8]
push edi
call eax
mov ecx, dword [ebp - 4]
add esp, 8
inc esi
add ecx, 0x10
mov dword [ebp - 4], ecx
cmp esi, dword [edi + 0x2e20]
jl 0x409d14
xor ecx, ecx
mov dword [ebp - 0x10], ecx
cmp dword [edi + 0x19d0], ecx
jle 0x409ea9
nop
mov eax, dword [edi + 0x19d8]
mov esi, dword [eax + ecx*4]
mov dword [ebp - 0xc], esi
test esi, esi
je 0x409e99
mov ecx, dword [esi]
test ecx, ecx
je 0x409d7f
mov eax, dword [0x4598f8]
test eax, eax
je 0x409d79
dec dword [eax + 0x370]
push ecx
call ebx
add esp, 4
cmp dword [esi + 0x280], 0
mov dword [ebp - 4], 0
je 0x409e0e
mov edi, dword [ebp - 0xc]
xor ecx, ecx
mov dword [ebp - 8], ecx
nop dword [eax + eax]
mov eax, dword [edi + 0x288]
add eax, ecx
mov dword [ebp - 0x14], eax
lea esi, [eax + 0x68]
mov ecx, esi
call fcn.0041fb90
mov ecx, dword [esi + 0x10]
test ecx, ecx
je 0x409dd1
mov eax, dword [0x4598f8]
test eax, eax
je 0x409dcb
dec dword [eax + 0x370]
push ecx
call ebx
add esp, 4
mov ecx, dword [ebp - 0x14]
mov ecx, dword [ecx + 0x64]
test ecx, ecx
je 0x409df0
mov eax, dword [0x4598f8]
test eax, eax
je 0x409dea
dec dword [eax + 0x370]
push ecx
call ebx
add esp, 4
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
inc eax
add ecx, 0x7c
mov dword [ebp - 4], eax
mov dword [ebp - 8], ecx
cmp eax, dword [edi + 0x280]
jne 0x409da0
mov edi, dword [ebp - 0x18]
mov esi, dword [ebp - 0xc]
lea ecx, [esi + 0x298]
call fcn.004042f0
mov ecx, dword [esi + 0x288]
test ecx, ecx
je 0x409e38
mov eax, dword [0x4598f8]
test eax, eax
je 0x409e32
dec dword [eax + 0x370]
push ecx
call ebx
add esp, 4
mov ecx, dword [esi + 0x27c]
test ecx, ecx
je 0x409e57
mov eax, dword [0x4598f8]
test eax, eax
je 0x409e51
dec dword [eax + 0x370]
push ecx
call ebx
add esp, 4
lea ecx, [esi + 0xd0]
call fcn.00407610
mov ecx, dword [esi + 0xcc]
test ecx, ecx
je 0x409e81
mov eax, dword [0x4598f8]
test eax, eax
je 0x409e7b
dec dword [eax + 0x370]
push ecx
call ebx
add esp, 4
mov eax, dword [0x4598f8]
test eax, eax
je 0x409e90
dec dword [eax + 0x370]
push esi
call ebx
mov ecx, dword [ebp - 0x10]
add esp, 4
inc ecx
mov dword [ebp - 0x10], ecx
cmp ecx, dword [edi + 0x19d0]
jl 0x409d50
mov ecx, dword [edi + 0x19d8]
test ecx, ecx
je 0x409ee6
mov eax, dword [0x4598f8]
mov dword [edi + 0x19d4], 0
mov dword [edi + 0x19d0], 0
test eax, eax
je 0x409ed6
dec dword [eax + 0x370]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x19d8], 0
mov ecx, dword [edi + 0x19e4]
test ecx, ecx
je 0x409f23
mov eax, dword [0x4598f8]
mov dword [edi + 0x19e0], 0
mov dword [edi + 0x19dc], 0
test eax, eax
je 0x409f13
dec dword [eax + 0x370]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x19e4], 0
mov ecx, dword [edi + 0x19f0]
test ecx, ecx
je 0x409f60
mov eax, dword [0x4598f8]
mov dword [edi + 0x19ec], 0
mov dword [edi + 0x19e8], 0
test eax, eax
je 0x409f50
dec dword [eax + 0x370]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x19f0], 0
mov dword [edi + 0x1a10], 0
mov ecx, dword [edi + 0x19fc]
test ecx, ecx
je 0x409fa7
mov eax, dword [0x4598f8]
mov dword [edi + 0x19f8], 0
mov dword [edi + 0x19f4], 0
test eax, eax
je 0x409f97
dec dword [eax + 0x370]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x19fc], 0
mov ecx, dword [edi + 0x1a08]
test ecx, ecx
je 0x409fe4
mov eax, dword [0x4598f8]
mov dword [edi + 0x1a04], 0
mov dword [edi + 0x1a00], 0
test eax, eax
je 0x409fd4
dec dword [eax + 0x370]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x1a08], 0
mov dword [edi + 0x1b48], 0
mov dword [edi + 0x1a1c], 0
mov dword [edi + 0x1a18], 0
mov dword [edi + 0x1a14], 0
mov dword [edi + 0x1a8c], 0
mov dword [edi + 0x1a78], 0
mov dword [edi + 0x1a20], 0
mov ecx, dword [edi + 0x1b14]
test ecx, ecx
je 0x40a067
mov eax, dword [0x4598f8]
mov dword [edi + 0x1b10], 0
mov dword [edi + 0x1b0c], 0
test eax, eax
je 0x40a057
dec dword [eax + 0x370]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x1b14], 0
mov ecx, dword [edi + 0x1b20]
test ecx, ecx
je 0x40a0a4
mov eax, dword [0x4598f8]
mov dword [edi + 0x1b1c], 0
mov dword [edi + 0x1b18], 0
test eax, eax
je 0x40a094
dec dword [eax + 0x370]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x1b20], 0
mov ecx, dword [edi + 0x1b2c]
test ecx, ecx
je 0x40a0e1
mov eax, dword [0x4598f8]
mov dword [edi + 0x1b28], 0
mov dword [edi + 0x1b24], 0
test eax, eax
je 0x40a0d1
dec dword [eax + 0x370]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x1b2c], 0
mov ecx, dword [edi + 0x1b38]
test ecx, ecx
je 0x40a11e
mov eax, dword [0x4598f8]
mov dword [edi + 0x1b34], 0
mov dword [edi + 0x1b30], 0
test eax, eax
je 0x40a10e
dec dword [eax + 0x370]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x1b38], 0
mov ecx, dword [edi + 0x1b44]
test ecx, ecx
je 0x40a15b
mov eax, dword [0x4598f8]
mov dword [edi + 0x1b40], 0
mov dword [edi + 0x1b3c], 0
test eax, eax
je 0x40a14b
dec dword [eax + 0x370]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x1b44], 0
mov eax, 2
lea esi, [edi + 0x1cb8]
mov dword [ebp - 0x10], eax
nop dword [eax]
mov ecx, dword [esi]
test ecx, ecx
je 0x40a1a2
mov eax, dword [0x4598f8]
mov dword [esi - 4], 0
mov dword [esi - 8], 0
test eax, eax
je 0x40a193
dec dword [eax + 0x370]
push ecx
call ebx
mov eax, dword [ebp - 0x10]
add esp, 4
mov dword [esi], 0
add esi, 0xc
sub eax, 1
mov dword [ebp - 0x10], eax
jne 0x40a170
lea ecx, [edi + 0x1ccc]
call fcn.0041d950
lea ecx, [edi + 0x1d58]
call fcn.0041d950
lea ecx, [edi + 0x1e7c]
call fcn.00415780
mov ecx, dword [edi + 0x1ea0]
test ecx, ecx
je 0x40a20b
mov eax, dword [0x4598f8]
mov dword [edi + 0x1e9c], 0
mov dword [edi + 0x1e98], 0
test eax, eax
je 0x40a1fb
dec dword [eax + 0x370]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x1ea0], 0
mov ecx, dword [edi + 0x1eac]
test ecx, ecx
je 0x40a248
mov eax, dword [0x4598f8]
mov dword [edi + 0x1ea8], 0
mov dword [edi + 0x1ea4], 0
test eax, eax
je 0x40a238
dec dword [eax + 0x370]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x1eac], 0
mov ecx, dword [edi + 0x2dd4]
test ecx, ecx
je 0x40a285
mov eax, dword [0x4598f8]
mov dword [edi + 0x2dd0], 0
mov dword [edi + 0x2dcc], 0
test eax, eax
je 0x40a275
dec dword [eax + 0x370]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x2dd4], 0
mov ecx, dword [edi + 0x2de0]
test ecx, ecx
je 0x40a2c2
mov eax, dword [0x4598f8]
mov dword [edi + 0x2ddc], 0
mov dword [edi + 0x2dd8], 0
test eax, eax
je 0x40a2b2
dec dword [eax + 0x370]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x2de0], 0
mov ecx, dword [edi + 0x1ecc]
test ecx, ecx
je 0x40a2ff
mov eax, dword [0x4598f8]
mov dword [edi + 0x1ec8], 0
mov dword [edi + 0x1ec4], 0
test eax, eax
je 0x40a2ef
dec dword [eax + 0x370]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x1ecc], 0
mov ecx, dword [edi + 0x1ed8]
test ecx, ecx
je 0x40a33c
mov eax, dword [0x4598f8]
mov dword [edi + 0x1ed4], 0
mov dword [edi + 0x1ed0], 0
test eax, eax
je 0x40a32c
dec dword [eax + 0x370]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x1ed8], 0
mov ecx, dword [edi + 0x1ee4]
test ecx, ecx
je 0x40a379
mov eax, dword [0x4598f8]
mov dword [edi + 0x1ee0], 0
mov dword [edi + 0x1edc], 0
test eax, eax
je 0x40a369
dec dword [eax + 0x370]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x1ee4], 0
mov ecx, dword [edi + 0x2e1c]
test ecx, ecx
je 0x40a3b6
mov eax, dword [0x4598f8]
mov dword [edi + 0x2e18], 0
mov dword [edi + 0x2e14], 0
test eax, eax
je 0x40a3a6
dec dword [eax + 0x370]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x2e1c], 0
mov ecx, dword [edi + 0x2e10]
test ecx, ecx
je 0x40a3f3
mov eax, dword [0x4598f8]
mov dword [edi + 0x2e0c], 0
mov dword [edi + 0x2e08], 0
test eax, eax
je 0x40a3e3
dec dword [eax + 0x370]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x2e10], 0
cmp dword [edi + 0x2e34], 0
je 0x40a425
mov esi, dword [edi + 0x2e34]
push 1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
cmp esi, eax
je 0x40a41b
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov dword [edi + 0x2e34], 0
mov ecx, dword [edi + 0x2e40]
test ecx, ecx
je 0x40a462
mov eax, dword [0x4598f8]
mov dword [edi + 0x2e3c], 0
mov dword [edi + 0x2e38], 0
test eax, eax
je 0x40a452
dec dword [eax + 0x370]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x2e40], 0
mov byte [edi], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret