Function at 0x4058d0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x43cf00
push eax
mov dword fs:[0], esp
sub esp, 0x18
push ebx
push esi
push edi
mov edi, dword [0x588178]
mov eax, dword [edi + 0x2c]
test eax, eax
je 0x40590d
cmp byte [edi + 1], 0
je 0x40590d
mov byte [eax + 0x10], 0
mov ecx, dword [edi + 0x2c]
call fcn.0041c000
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov dword [edi + 0x2c], 0
mov ecx, dword [edi + 0x3c0c]
test ecx, ecx
je 0x405957
mov eax, dword [0x588178]
mov dword [edi + 0x3c08], 0
mov dword [edi + 0x3c04], 0
test eax, eax
je 0x405947
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3c0c], 0
cmp byte [edi], 0
je 0x406344
cmp byte [edi + 0x5b24], 0
je 0x4059c3
mov esi, dword [edi + 0x20]
test esi, esi
je 0x4059c3
mov eax, dword [0x588178]
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x10], 0
mov dword [eax + 0x5b28], 0
call fcn.0041a110
mov edx, 0x442d44
mov dword [ebp - 0x14], eax
mov ecx, esi
call fcn.00403b10
mov esi, eax
test esi, esi
je 0x4059c3
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
mov eax, dword [edi + 0x5b5c]
mov esi, dword [edi + 0x5b64]
lea eax, [eax + eax*4]
lea eax, [esi + eax*4]
mov dword [ebp - 0x14], eax
cmp esi, eax
je 0x4059fa
nop dword [eax]
cmp dword [esi + 4], 6
jne 0x4059f3
mov eax, dword [esi + 0xc]
push esi
push edi
call eax
mov eax, dword [ebp - 0x14]
add esp, 8
add esi, 0x14
cmp esi, eax
jne 0x4059e0
xor esi, esi
lea ecx, [edi + 0x3e20]
mov dword [ebp - 0x10], ecx
cmp dword [edi + 0x3e18], esi
jle 0x405a4b
nop dword [eax]
mov eax, dword [ecx]
mov eax, dword [eax + esi*4]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x405a40
mov ecx, eax
call fcn.00406aa0
mov eax, dword [0x588178]
test eax, eax
je 0x405a32
dec dword [eax + 0xb0]
push dword [ebp - 0x14]
call ebx
add esp, 4
lea ecx, [edi + 0x3e20]
inc esi
cmp esi, dword [edi + 0x3e18]
jl 0x405a10
jmp 0x405a4e
mov dword [ebp - 0x10], ecx
mov ecx, dword [ecx]
test ecx, ecx
je 0x405a86
mov eax, dword [0x588178]
mov dword [edi + 0x3e1c], 0
mov dword [edi + 0x3e18], 0
test eax, eax
je 0x405a77
dec dword [eax + 0xb0]
push ecx
call ebx
mov eax, dword [ebp - 0x10]
add esp, 4
mov dword [eax], 0
mov ecx, dword [edi + 0x3e2c]
test ecx, ecx
je 0x405ac3
mov eax, dword [0x588178]
mov dword [edi + 0x3e28], 0
mov dword [edi + 0x3e24], 0
test eax, eax
je 0x405ab3
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3e2c], 0
mov ecx, dword [edi + 0x3e38]
test ecx, ecx
je 0x405b00
mov eax, dword [0x588178]
mov dword [edi + 0x3e34], 0
mov dword [edi + 0x3e30], 0
test eax, eax
je 0x405af0
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3e38], 0
mov dword [edi + 0x3e60], 0
mov ecx, dword [edi + 0x3e44]
test ecx, ecx
je 0x405b47
mov eax, dword [0x588178]
mov dword [edi + 0x3e40], 0
mov dword [edi + 0x3e3c], 0
test eax, eax
je 0x405b37
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3e44], 0
mov ecx, dword [edi + 0x3e50]
test ecx, ecx
je 0x405b84
mov eax, dword [0x588178]
mov dword [edi + 0x3e4c], 0
mov dword [edi + 0x3e48], 0
test eax, eax
je 0x405b74
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3e50], 0
lea ecx, [edi + 0x4578]
mov dword [edi + 0x47f8], 0
mov dword [edi + 0x3e68], 0
mov dword [edi + 0x3e64], 0
mov dword [edi + 0x3edc], 0
mov dword [edi + 0x3ec8], 0
mov dword [edi + 0x3e6c], 0
call fcn.00401350
mov ecx, dword [edi + 0x4784]
test ecx, ecx
je 0x405c08
mov eax, dword [0x588178]
mov dword [edi + 0x4780], 0
mov dword [edi + 0x477c], 0
test eax, eax
je 0x405bf8
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x4784], 0
mov ecx, dword [edi + 0x4790]
test ecx, ecx
je 0x405c45
mov eax, dword [0x588178]
mov dword [edi + 0x478c], 0
mov dword [edi + 0x4788], 0
test eax, eax
je 0x405c35
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x4790], 0
mov ecx, dword [edi + 0x479c]
test ecx, ecx
je 0x405c82
mov eax, dword [0x588178]
mov dword [edi + 0x4798], 0
mov dword [edi + 0x4794], 0
test eax, eax
je 0x405c72
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x479c], 0
mov ecx, dword [edi + 0x47cc]
test ecx, ecx
je 0x405cbf
mov eax, dword [0x588178]
mov dword [edi + 0x47c8], 0
mov dword [edi + 0x47c4], 0
test eax, eax
je 0x405caf
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x47cc], 0
mov ecx, dword [edi + 0x47d8]
test ecx, ecx
je 0x405cfc
mov eax, dword [0x588178]
mov dword [edi + 0x47d4], 0
mov dword [edi + 0x47d0], 0
test eax, eax
je 0x405cec
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x47d8], 0
mov ecx, dword [edi + 0x47e4]
test ecx, ecx
je 0x405d39
mov eax, dword [0x588178]
mov dword [edi + 0x47e0], 0
mov dword [edi + 0x47dc], 0
test eax, eax
je 0x405d29
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x47e4], 0
xor ecx, ecx
mov dword [ebp - 0x10], ecx
cmp dword [edi + 0x47ec], ecx
jle 0x405e1b
nop word [eax + eax]
mov eax, dword [edi + 0x47f4]
mov esi, dword [eax + ecx*4]
test esi, esi
je 0x405e0b
mov eax, dword [esi + 0x30]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x405d89
mov ecx, eax
call fcn.004010f0
mov eax, dword [0x588178]
test eax, eax
je 0x405d81
dec dword [eax + 0xb0]
push dword [ebp - 0x14]
call ebx
add esp, 4
mov eax, dword [esi + 0x34]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x405db1
mov ecx, eax
call fcn.004010f0
mov eax, dword [0x588178]
test eax, eax
je 0x405da9
dec dword [eax + 0xb0]
push dword [ebp - 0x14]
call ebx
add esp, 4
mov ecx, dword [esi + 0x80]
test ecx, ecx
je 0x405dd0
mov eax, dword [0x588178]
test eax, eax
je 0x405dca
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov ecx, dword [esi + 0x50]
test ecx, ecx
je 0x405dec
mov eax, dword [0x588178]
test eax, eax
je 0x405de6
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [0x588178]
test eax, eax
je 0x405e02
dec dword [eax + 0xb0]
push esi
call ebx
mov ecx, dword [ebp - 0x10]
add esp, 4
inc ecx
mov dword [ebp - 0x10], ecx
cmp ecx, dword [edi + 0x47ec]
jl 0x405d50
mov ecx, dword [edi + 0x47f4]
test ecx, ecx
je 0x405e58
mov eax, dword [0x588178]
mov dword [edi + 0x47f0], 0
mov dword [edi + 0x47ec], 0
test eax, eax
je 0x405e48
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x47f4], 0
lea ecx, [edi + 0x4ac4]
call fcn.0041b200
mov ecx, dword [edi + 0x4aec]
test ecx, ecx
je 0x405ea0
mov eax, dword [0x588178]
mov dword [edi + 0x4ae8], 0
mov dword [edi + 0x4ae4], 0
test eax, eax
je 0x405e90
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x4aec], 0
mov ecx, dword [edi + 0x4af8]
test ecx, ecx
je 0x405edd
mov eax, dword [0x588178]
mov dword [edi + 0x4af4], 0
mov dword [edi + 0x4af0], 0
test eax, eax
je 0x405ecd
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x4af8], 0
xor esi, esi
cmp dword [edi + 0x4a68], esi
jle 0x405f2c
xor ecx, ecx
mov dword [ebp - 0x10], ecx
nop dword [eax]
mov eax, dword [edi + 0x4a70]
mov edx, dword [eax + ecx + 0x18]
test edx, edx
je 0x405f16
mov eax, dword [0x588178]
test eax, eax
je 0x405f0d
dec dword [eax + 0xb0]
push edx
call ebx
mov ecx, dword [ebp - 0x10]
add esp, 4
mov dword [ebp - 4], 0xffffffff
inc esi
add ecx, 0x1c
mov dword [ebp - 0x10], ecx
cmp esi, dword [edi + 0x4a68]
jl 0x405ef0
mov ecx, dword [edi + 0x4a70]
test ecx, ecx
je 0x405f69
mov eax, dword [0x588178]
mov dword [edi + 0x4a6c], 0
mov dword [edi + 0x4a68], 0
test eax, eax
je 0x405f59
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x4a70], 0
lea ecx, [edi + 0x4a88]
call fcn.0041b400
cmp dword [edi + 0x4a7c], 0
mov dword [ebp - 0x10], 0
jle 0x405fe2
xor ecx, ecx
mov dword [ebp - 0x14], ecx
nop dword [eax]
mov esi, dword [edi + 0x4a84]
add esi, ecx
lea ecx, [esi + 0x10]
mov dword [ebp - 4], 4
call fcn.00426840
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x405fc3
mov eax, dword [0x588178]
test eax, eax
je 0x405fbd
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
add ecx, 0x68
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], eax
cmp eax, dword [edi + 0x4a7c]
jl 0x405f90
mov ecx, dword [edi + 0x4a84]
test ecx, ecx
je 0x40601f
mov eax, dword [0x588178]
mov dword [edi + 0x4a80], 0
mov dword [edi + 0x4a7c], 0
test eax, eax
je 0x40600f
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x4a84], 0
mov ecx, dword [edi + 0x4abc]
test ecx, ecx
je 0x40605c
mov eax, dword [0x588178]
mov dword [edi + 0x4ab8], 0
mov dword [edi + 0x4ab4], 0
test eax, eax
je 0x40604c
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x4abc], 0
mov ecx, dword [edi + 0x5a94]
test ecx, ecx
je 0x406099
mov eax, dword [0x588178]
mov dword [edi + 0x5a90], 0
mov dword [edi + 0x5a8c], 0
test eax, eax
je 0x406089
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x5a94], 0
mov ecx, dword [edi + 0x5aa0]
test ecx, ecx
je 0x4060d6
mov eax, dword [0x588178]
mov dword [edi + 0x5a9c], 0
mov dword [edi + 0x5a98], 0
test eax, eax
je 0x4060c6
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x5aa0], 0
mov ecx, dword [edi + 0x4b3c]
test ecx, ecx
je 0x406113
mov eax, dword [0x588178]
mov dword [edi + 0x4b38], 0
mov dword [edi + 0x4b34], 0
test eax, eax
je 0x406103
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x4b3c], 0
mov ecx, dword [edi + 0x4b48]
test ecx, ecx
je 0x406150
mov eax, dword [0x588178]
mov dword [edi + 0x4b44], 0
mov dword [edi + 0x4b40], 0
test eax, eax
je 0x406140
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x4b48], 0
mov ecx, dword [edi + 0x4b54]
test ecx, ecx
je 0x40618d
mov eax, dword [0x588178]
mov dword [edi + 0x4b50], 0
mov dword [edi + 0x4b4c], 0
test eax, eax
je 0x40617d
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x4b54], 0
mov dword [edi + 0x599c], 0
mov ecx, dword [edi + 0x59a8]
test ecx, ecx
je 0x4061d4
mov eax, dword [0x588178]
mov dword [edi + 0x59a4], 0
mov dword [edi + 0x59a0], 0
test eax, eax
je 0x4061c4
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x59a8], 0
mov ecx, dword [edi + 0x5b4c]
test ecx, ecx
je 0x406211
mov eax, dword [0x588178]
mov dword [edi + 0x5b48], 0
mov dword [edi + 0x5b44], 0
test eax, eax
je 0x406201
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x5b4c], 0
mov ecx, dword [edi + 0x5b40]
test ecx, ecx
je 0x40624e
mov eax, dword [0x588178]
mov dword [edi + 0x5b3c], 0
mov dword [edi + 0x5b38], 0
test eax, eax
je 0x40623e
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x5b40], 0
cmp dword [edi + 0x5b94], 0
je 0x406280
mov esi, dword [edi + 0x5b94]
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 0x406276
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov dword [edi + 0x5b94], 0
mov ecx, dword [edi + 0x5ba0]
test ecx, ecx
je 0x4062bd
mov eax, dword [0x588178]
mov dword [edi + 0x5b9c], 0
mov dword [edi + 0x5b98], 0
test eax, eax
je 0x4062ad
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x5ba0], 0
mov ecx, dword [edi + 0x5bcc]
test ecx, ecx
je 0x4062fa
mov eax, dword [0x588178]
mov dword [edi + 0x5bc8], 0
mov dword [edi + 0x5bc4], 0
test eax, eax
je 0x4062ea
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x5bcc], 0
mov ecx, dword [edi + 0x5bd8]
test ecx, ecx
je 0x406337
mov eax, dword [0x588178]
mov dword [edi + 0x5bd4], 0
mov dword [edi + 0x5bd0], 0
test eax, eax
je 0x406327
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x5bd8], 0
mov dword [edi + 0x5bdc], 0
mov byte [edi], 0
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret