Function at 0x566d80
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x70
push ebx
push ebp
push esi
push edi
mov edi, eax
xor eax, eax
test edi, edi
je 0x566fec
mov edx, dword [edi]
xor ecx, ecx
push ecx
push ecx
push ecx
push eax
push edi
call dword [edx + 0x14]
mov eax, dword [edi]
lea ecx, [esp + 0x18]
push ecx
push 0x1c
lea edx, [esp + 0x28]
push edx
push edi
call dword [eax + 0xc]
test eax, eax
jl 0x566fec
lea ecx, [esp + 0x18]
test ecx, ecx
mov ecx, dword [esp + 0x28]
jne 0x566dc9
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x566fec
push 0
push edi
call fcn.00562d50
test eax, eax
jl 0x566fec
mov ecx, dword [0x5eefa8]
mov esi, dword [esp + 0x84]
lea edx, [esp + 0x18]
push edx
mov edx, dword [0x5eefac]
sub esp, 0x10
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [0x5eefb0]
mov dword [eax + 4], edx
mov edx, dword [0x5eefb4]
mov dword [eax + 8], ecx
push esi
mov dword [eax + 0xc], edx
call fcn.00565910
test eax, eax
jl 0x566fec
mov eax, dword [edi]
lea ecx, [esp + 0x14]
push ecx
mov ebx, 0x24
push ebx
lea edx, [esp + 0x64]
push edx
push edi
call dword [eax + 0xc]
test eax, eax
jl 0x566fe7
cmp dword [esp + 0x14], ebx
jne 0x566fe7
push 0
lea eax, [esp + 0x14]
push eax
push ebx
lea ecx, [esp + 0x68]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x566fbe
cmp dword [esp + 0x10], ebx
jne 0x566fbe
mov eax, dword [esp + 0x78]
xor ebp, ebp
xor esi, esi
test eax, eax
jbe 0x566ee3
lea ecx, [ecx]
mov edx, dword [edi]
lea eax, [esp + 0x14]
push eax
push 0x20
lea ecx, [esp + 0x44]
push ecx
push edi
call dword [edx + 0xc]
test eax, eax
jl 0x566fe7
cmp dword [esp + 0x14], 0x20
jne 0x566fe7
mov ecx, dword [esp + 0x84]
push 0
lea edx, [esp + 0x14]
push edx
push 0x20
lea eax, [esp + 0x48]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x566fbe
cmp dword [esp + 0x10], 0x20
jne 0x566fbe
mov eax, dword [esp + 0x78]
add ebx, 0x20
adc ebp, 0
inc esi
cmp esi, eax
jb 0x566e80
mov eax, dword [esp + 0x7c]
test eax, eax
je 0x566f81
push eax
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, eax
test esi, esi
jne 0x566f14
mov eax, 0x8007000e
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70
ret 4
mov ecx, dword [esp + 0x7c]
mov edx, dword [edi]
lea eax, [esp + 0x14]
push eax
push ecx
push esi
push edi
call dword [edx + 0xc]
test eax, eax
jl 0x566fcd
mov eax, dword [esp + 0x7c]
cmp dword [esp + 0x14], eax
jne 0x566fcd
push 0
lea edx, [esp + 0x14]
push edx
push eax
mov eax, dword [esp + 0x90]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x566fa4
mov ecx, dword [esp + 0x7c]
cmp ecx, dword [esp + 0x10]
jne 0x566fa4
mov edi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push esi
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
add ebx, dword [esp + 0x10]
adc ebp, 0
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x84]
push ebp
push ebx
push edx
push eax
push ecx
call fcn.00565990
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70
ret 4
mov edi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push esi
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, 0x8004e009
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70
ret 4
mov edi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push esi
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, 0x8004e008
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70
ret 4