Function at 0x40a0d0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4451e0
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x45100c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [0x451660]
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [edi + 0x40]
test eax, eax
je 0x40a138
cmp byte [edi + 1], 0
je 0x40a138
mov byte [eax + 0x10], 0
mov esi, dword [edi + 0x40]
test esi, esi
je 0x40a138
mov ecx, esi
call fcn.00423890
mov eax, dword [0x451660]
test eax, eax
je 0x40a132
dec dword [eax + 0xa8]
push esi
call ebx
add esp, 4
cmp byte [edi], 0
mov dword [edi + 0x40], 0
je 0x40aa5d
cmp byte [edi + 0x5201], 0
je 0x40a1ab
mov esi, dword [edi + 0x20]
test esi, esi
je 0x40a1ab
mov eax, dword [0x451660]
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x10], 0
mov dword [eax + 0x5204], 0
call fcn.004171f0
mov edx, 0x4477f0
mov dword [ebp - 0x14], eax
mov ecx, esi
call fcn.00405740
mov esi, eax
test esi, esi
je 0x40a1ab
push esi
push dword [ebp - 0x10]
mov dword [ebp - 0x1c], 0
push 1
push dword [ebp - 0x14]
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
xor esi, esi
cmp dword [edi + 0x5238], esi
jle 0x40a1ea
xor ecx, ecx
mov dword [ebp - 0x10], ecx
nop word [eax + eax]
mov edx, dword [edi + 0x5240]
add edx, ecx
cmp dword [edx + 4], 6
jne 0x40a1db
mov eax, dword [edx + 0xc]
push edx
push edi
call eax
mov ecx, dword [ebp - 0x10]
add esp, 8
inc esi
add ecx, 0x14
mov dword [ebp - 0x10], ecx
cmp esi, dword [edi + 0x5238]
jl 0x40a1c0
xor esi, esi
lea ecx, [edi + 0x3de0]
mov dword [ebp - 0x10], ecx
cmp dword [edi + 0x3dd8], esi
jle 0x40a23b
nop dword [eax]
mov eax, dword [ecx]
mov eax, dword [eax + esi*4]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x40a230
mov ecx, eax
call fcn.00407040
mov eax, dword [0x451660]
test eax, eax
je 0x40a222
dec dword [eax + 0xa8]
push dword [ebp - 0x14]
call ebx
add esp, 4
lea ecx, [edi + 0x3de0]
inc esi
cmp esi, dword [edi + 0x3dd8]
jl 0x40a200
jmp 0x40a23e
mov dword [ebp - 0x10], ecx
mov ecx, dword [ecx]
test ecx, ecx
je 0x40a276
mov eax, dword [0x451660]
mov dword [edi + 0x3ddc], 0
mov dword [edi + 0x3dd8], 0
test eax, eax
je 0x40a267
dec dword [eax + 0xa8]
push ecx
call ebx
mov eax, dword [ebp - 0x10]
add esp, 4
mov dword [eax], 0
mov ecx, dword [edi + 0x3dec]
test ecx, ecx
je 0x40a2b3
mov eax, dword [0x451660]
mov dword [edi + 0x3de8], 0
mov dword [edi + 0x3de4], 0
test eax, eax
je 0x40a2a3
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3dec], 0
mov ecx, dword [edi + 0x3df8]
test ecx, ecx
je 0x40a2f0
mov eax, dword [0x451660]
mov dword [edi + 0x3df4], 0
mov dword [edi + 0x3df0], 0
test eax, eax
je 0x40a2e0
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3df8], 0
mov dword [edi + 0x3e20], 0
mov ecx, dword [edi + 0x3e04]
test ecx, ecx
je 0x40a337
mov eax, dword [0x451660]
mov dword [edi + 0x3e00], 0
mov dword [edi + 0x3dfc], 0
test eax, eax
je 0x40a327
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3e04], 0
mov ecx, dword [edi + 0x3e10]
test ecx, ecx
je 0x40a374
mov eax, dword [0x451660]
mov dword [edi + 0x3e0c], 0
mov dword [edi + 0x3e08], 0
test eax, eax
je 0x40a364
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3e10], 0
mov dword [edi + 0x3fd4], 0
mov dword [edi + 0x3e28], 0
mov dword [edi + 0x3e24], 0
mov dword [edi + 0x3e88], 0
mov dword [edi + 0x3e74], 0
mov dword [edi + 0x3e2c], 0
mov ecx, dword [edi + 0x3f6c]
test ecx, ecx
je 0x40a3ed
mov eax, dword [0x451660]
mov dword [edi + 0x3f68], 0
mov dword [edi + 0x3f64], 0
test eax, eax
je 0x40a3dd
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3f6c], 0
mov ecx, dword [edi + 0x3f78]
test ecx, ecx
je 0x40a42a
mov eax, dword [0x451660]
mov dword [edi + 0x3f74], 0
mov dword [edi + 0x3f70], 0
test eax, eax
je 0x40a41a
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3f78], 0
mov ecx, dword [edi + 0x3f84]
test ecx, ecx
je 0x40a467
mov eax, dword [0x451660]
mov dword [edi + 0x3f80], 0
mov dword [edi + 0x3f7c], 0
test eax, eax
je 0x40a457
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3f84], 0
mov ecx, dword [edi + 0x3fb4]
test ecx, ecx
je 0x40a4a4
mov eax, dword [0x451660]
mov dword [edi + 0x3fb0], 0
mov dword [edi + 0x3fac], 0
test eax, eax
je 0x40a494
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3fb4], 0
mov ecx, dword [edi + 0x3fc0]
test ecx, ecx
je 0x40a4e1
mov eax, dword [0x451660]
mov dword [edi + 0x3fbc], 0
mov dword [edi + 0x3fb8], 0
test eax, eax
je 0x40a4d1
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3fc0], 0
xor ecx, ecx
lea edx, [edi + 0x3fd0]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x14], edx
cmp dword [edi + 0x3fc8], ecx
jle 0x40a5b1
nop dword [eax + eax]
mov eax, dword [edx]
mov esi, dword [eax + ecx*4]
test esi, esi
je 0x40a59f
mov dword [ebp - 4], 0
mov eax, dword [esi + 0x30]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x40a53c
mov ecx, eax
call fcn.004036f0
mov eax, dword [0x451660]
test eax, eax
je 0x40a534
dec dword [eax + 0xa8]
push dword [ebp - 0x1c]
call ebx
add esp, 4
mov eax, dword [esi + 0x34]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x40a564
mov ecx, eax
call fcn.004036f0
mov eax, dword [0x451660]
test eax, eax
je 0x40a55c
dec dword [eax + 0xa8]
push dword [ebp - 0x1c]
call ebx
add esp, 4
push 0x417cd0
push 2
push 0xc
lea eax, [esi + 0x64]
mov byte [ebp - 4], 1
push eax
call fcn.00443be1
mov dword [ebp - 4], 0xffffffff
mov eax, dword [0x451660]
test eax, eax
je 0x40a590
dec dword [eax + 0xa8]
push esi
call ebx
mov ecx, dword [ebp - 0x10]
lea edx, [edi + 0x3fd0]
add esp, 4
inc ecx
mov dword [ebp - 0x10], ecx
cmp ecx, dword [edi + 0x3fc8]
jl 0x40a500
jmp 0x40a5b4
mov dword [ebp - 0x14], edx
mov ecx, dword [edx]
test ecx, ecx
je 0x40a5ec
mov eax, dword [0x451660]
mov dword [edi + 0x3fcc], 0
mov dword [edi + 0x3fc8], 0
test eax, eax
je 0x40a5dd
dec dword [eax + 0xa8]
push ecx
call ebx
mov eax, dword [ebp - 0x14]
add esp, 4
mov dword [eax], 0
lea ecx, [edi + 0x4244]
call fcn.00417d30
mov ecx, dword [edi + 0x426c]
test ecx, ecx
je 0x40a634
mov eax, dword [0x451660]
mov dword [edi + 0x4268], 0
mov dword [edi + 0x4264], 0
test eax, eax
je 0x40a624
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x426c], 0
mov ecx, dword [edi + 0x4278]
test ecx, ecx
je 0x40a671
mov eax, dword [0x451660]
mov dword [edi + 0x4274], 0
mov dword [edi + 0x4270], 0
test eax, eax
je 0x40a661
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x4278], 0
xor esi, esi
lea eax, [edi + 0x41f0]
mov dword [ebp - 0x10], eax
cmp dword [edi + 0x41e8], esi
jle 0x40a6d6
xor ecx, ecx
mov dword [ebp - 0x14], ecx
nop dword [eax]
mov eax, dword [eax]
mov edx, dword [eax + ecx + 0x18]
test edx, edx
je 0x40a6b2
mov eax, dword [0x451660]
test eax, eax
je 0x40a6a9
dec dword [eax + 0xa8]
push edx
call ebx
mov ecx, dword [ebp - 0x14]
add esp, 4
inc esi
mov dword [ebp - 4], 0xffffffff
add ecx, 0x1c
lea eax, [edi + 0x41f0]
mov dword [ebp - 0x14], ecx
cmp esi, dword [edi + 0x41e8]
jl 0x40a690
lea eax, [edi + 0x41f0]
jmp 0x40a6d9
mov dword [ebp - 0x10], eax
mov ecx, dword [eax]
test ecx, ecx
je 0x40a711
mov eax, dword [0x451660]
mov dword [edi + 0x41ec], 0
mov dword [edi + 0x41e8], 0
test eax, eax
je 0x40a702
dec dword [eax + 0xa8]
push ecx
call ebx
mov eax, dword [ebp - 0x10]
add esp, 4
mov dword [eax], 0
lea ecx, [edi + 0x4208]
call fcn.00417ed0
cmp dword [edi + 0x41fc], 0
lea esi, [edi + 0x4204]
mov dword [ebp - 0x14], 0
jle 0x40a791
xor ecx, ecx
mov dword [ebp - 0x10], ecx
mov esi, dword [esi]
add esi, ecx
lea ecx, [esi + 0x10]
mov dword [ebp - 4], 3
call fcn.004231f0
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x40a766
mov eax, dword [0x451660]
test eax, eax
je 0x40a760
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov eax, dword [ebp - 0x14]
lea esi, [edi + 0x4204]
mov dword [ebp - 4], 0xffffffff
inc eax
mov ecx, dword [ebp - 0x10]
add ecx, 0x68
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], ecx
cmp eax, dword [edi + 0x41fc]
jl 0x40a737
lea esi, [edi + 0x4204]
mov ecx, dword [esi]
test ecx, ecx
je 0x40a7c6
mov eax, dword [0x451660]
mov dword [edi + 0x4200], 0
mov dword [edi + 0x41fc], 0
test eax, eax
je 0x40a7ba
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [esi], 0
mov ecx, dword [edi + 0x423c]
test ecx, ecx
je 0x40a803
mov eax, dword [0x451660]
mov dword [edi + 0x4238], 0
mov dword [edi + 0x4234], 0
test eax, eax
je 0x40a7f3
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x423c], 0
mov ecx, dword [edi + 0x51d0]
test ecx, ecx
je 0x40a840
mov eax, dword [0x451660]
mov dword [edi + 0x51cc], 0
mov dword [edi + 0x51c8], 0
test eax, eax
je 0x40a830
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x51d0], 0
mov ecx, dword [edi + 0x51dc]
test ecx, ecx
je 0x40a87d
mov eax, dword [0x451660]
mov dword [edi + 0x51d8], 0
mov dword [edi + 0x51d4], 0
test eax, eax
je 0x40a86d
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x51dc], 0
mov ecx, dword [edi + 0x4298]
test ecx, ecx
je 0x40a8ba
mov eax, dword [0x451660]
mov dword [edi + 0x4294], 0
mov dword [edi + 0x4290], 0
test eax, eax
je 0x40a8aa
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x4298], 0
mov ecx, dword [edi + 0x42a4]
test ecx, ecx
je 0x40a8f7
mov eax, dword [0x451660]
mov dword [edi + 0x42a0], 0
mov dword [edi + 0x429c], 0
test eax, eax
je 0x40a8e7
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x42a4], 0
mov ecx, dword [edi + 0x42b0]
test ecx, ecx
je 0x40a934
mov eax, dword [0x451660]
mov dword [edi + 0x42ac], 0
mov dword [edi + 0x42a8], 0
test eax, eax
je 0x40a924
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x42b0], 0
mov ecx, dword [edi + 0x5228]
test ecx, ecx
je 0x40a971
mov eax, dword [0x451660]
mov dword [edi + 0x5224], 0
mov dword [edi + 0x5220], 0
test eax, eax
je 0x40a961
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x5228], 0
mov ecx, dword [edi + 0x521c]
test ecx, ecx
je 0x40a9ae
mov eax, dword [0x451660]
mov dword [edi + 0x5218], 0
mov dword [edi + 0x5214], 0
test eax, eax
je 0x40a99e
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x521c], 0
cmp dword [edi + 0x5250], 0
je 0x40a9e0
mov esi, dword [edi + 0x5250]
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 0x40a9d6
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov dword [edi + 0x5250], 0
mov ecx, dword [edi + 0x525c]
test ecx, ecx
je 0x40aa1d
mov eax, dword [0x451660]
mov dword [edi + 0x5258], 0
mov dword [edi + 0x5254], 0
test eax, eax
je 0x40aa0d
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x525c], 0
mov ecx, dword [edi + 0x5288]
test ecx, ecx
je 0x40aa5a
mov eax, dword [0x451660]
mov dword [edi + 0x5284], 0
mov dword [edi + 0x5280], 0
test eax, eax
je 0x40aa4a
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x5288], 0
mov byte [edi], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret