Function at 0x51c750
Capabilities:
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x5d17a8
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x65b4e4]
xor eax, esp
mov dword [esp + 0x74], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x65b4e4]
xor eax, esp
push eax
lea eax, [esp + 0x8c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x9c]
mov ecx, dword [esp + 0xa0]
mov ebp, dword [esp + 0xa4]
mov dword [esp + 0x20], eax
mov ebx, 0xf
xor esi, esi
mov eax, ecx
mov dword [esp + 0x84], ebx
mov dword [esp + 0x80], esi
mov byte [esp + 0x70], 0
lea edi, [eax + 1]
lea ecx, [ecx]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x51c7c0
sub eax, edi
push eax
push ecx
lea ecx, [esp + 0x74]
call fcn.004098b0
push 0xffffffffffffffff
push 2
lea ecx, [esp + 0x3c]
push ecx
lea ecx, [esp + 0x78]
mov dword [esp + 0xa0], esi
call fcn.004253c0
push 0xffffffffffffffff
push esi
push eax
lea ecx, [esp + 0x78]
mov byte [esp + 0xa0], 1
call fcn.004080b0
cmp dword [esp + 0x4c], 0x10
mov byte [esp + 0x94], 0
jb 0x51c820
mov edx, dword [esp + 0x38]
push edx
call fcn.00594e98
add esp, 4
push 0xffffffffffffffff
push esi
lea eax, [esp + 0x74]
push eax
lea ecx, [esp + 0x5c]
mov dword [esp + 0x74], ebx
mov dword [esp + 0x70], esi
mov byte [esp + 0x60], 0
call fcn.004080b0
mov al, 0x23
mov byte [esp + 0x94], 2
mov byte [esp + 0x18], 0x5c
mov byte [esp + 0x19], 0x3a
mov byte [esp + 0x1c], al
mov byte [esp + 0x1d], al
xor edi, edi
lea esp, [esp]
mov bl, byte [esp + edi + 0x18]
push 1
push esi
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x5c]
mov byte [esp + 0x20], bl
call fcn.00425960
cmp eax, 0xffffffff
je 0x51c8b3
mov dl, byte [esp + edi + 0x1c]
mov byte [esp + 0x24], dl
mov byte [esp + 0x14], bl
mov ecx, dword [esp + 0x24]
push ecx
push 1
push 1
push eax
lea ecx, [esp + 0x60]
call fcn.0051c440
push 1
push esi
lea edx, [esp + 0x1c]
push edx
lea ecx, [esp + 0x5c]
call fcn.00425960
cmp eax, 0xffffffff
jne 0x51c88a
add edi, 1
cmp edi, 2
jl 0x51c860
push 0xffffffffffffffff
push esi
lea eax, [esp + 0x58]
push eax
mov ecx, ebp
call fcn.00408470
mov eax, dword [esp + 0x70]
mov ebx, 0x10
cmp dword [esp + 0x84], ebx
jae 0x51c8e0
lea eax, [esp + 0x70]
mov ecx, dword [esp + 0x20]
push esi
push eax
call fcn.005949d0
mov edi, eax
cmp edi, 0xffffffff
mov dword [esp + 0x24], edi
je 0x51caff
cmp edi, esi
je 0x51caff
cmp dword [ebp + 0x18], ebx
jb 0x51c90c
mov eax, dword [ebp + 4]
jmp 0x51c90f
lea eax, [ebp + 4]
push esi
push esi
push 2
push esi
push esi
push 0x10000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [esp + 0x18], ebx
jne 0x51c98c
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
jne 0x51c93c
lea ebx, [eax - 0x1f]
mov ecx, dword [esp + 0x20]
push edi
call fcn.00594a00
mov edi, 0x10
cmp dword [esp + 0x68], edi
jb 0x51c95e
mov ecx, dword [esp + 0x54]
push ecx
call fcn.00594e98
add esp, 4
cmp dword [esp + 0x84], edi
mov dword [esp + 0x68], 0xf
mov dword [esp + 0x64], esi
mov byte [esp + 0x54], 0
jb 0x51c985
mov edx, dword [esp + 0x70]
push edx
call fcn.00594e98
add esp, 4
mov eax, ebx
jmp 0x51cb3b
mov ebp, dword [esp + 0x20]
push edi
mov ecx, ebp
call fcn.00594a20
mov dword [esp + 0x28], eax
or eax, edx
mov dword [esp + 0x2c], edx
jne 0x51c9fc
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
mov ecx, ebp
call fcn.00594a00
mov edi, 0x10
cmp dword [esp + 0x68], edi
jb 0x51c9cb
mov eax, dword [esp + 0x54]
push eax
call fcn.00594e98
add esp, 4
cmp dword [esp + 0x84], edi
mov dword [esp + 0x68], 0xf
mov dword [esp + 0x64], esi
mov byte [esp + 0x54], 0
jb 0x51c9f2
mov ecx, dword [esp + 0x70]
push ecx
call fcn.00594e98
add esp, 4
mov eax, 1
jmp 0x51cb3b
push 0x10000
mov edi, 1
call fcn.00594e9d
xor ebp, ebp
add esp, 4
cmp dword [esp + 0x2c], ebp
mov ebx, eax
jb 0x51ca96
ja 0x51ca20
cmp dword [esp + 0x28], ebp
jbe 0x51ca96
mov edx, 0x10000
mov ecx, esi
add ecx, edx
mov eax, ebp
adc eax, 0
cmp eax, dword [esp + 0x2c]
jb 0x51ca42
ja 0x51ca3c
cmp ecx, dword [esp + 0x28]
jbe 0x51ca42
mov edx, dword [esp + 0x28]
sub edx, esi
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x1c]
push eax
push edx
push ebx
push ebp
push esi
push ecx
mov ecx, dword [esp + 0x38]
call fcn.00594a50
mov edi, eax
test edi, edi
je 0x51ca96
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x51ca96
push 0
lea edx, [esp + 0x34]
push edx
push eax
mov eax, dword [esp + 0x24]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, eax
test edi, edi
je 0x51ca96
add esi, dword [esp + 0x1c]
adc ebp, 0
cmp ebp, dword [esp + 0x2c]
jb 0x51ca20
ja 0x51ca96
cmp esi, dword [esp + 0x28]
jb 0x51ca20
push ebx
call fcn.00594e98
mov ecx, dword [esp + 0x1c]
add esp, 4
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
push edx
call fcn.00594a00
mov esi, 0x10
cmp dword [esp + 0x68], esi
jb 0x51cad0
mov eax, dword [esp + 0x54]
push eax
call fcn.00594e98
add esp, 4
cmp dword [esp + 0x84], esi
mov dword [esp + 0x68], 0xf
mov dword [esp + 0x64], 0
mov byte [esp + 0x54], 0
jb 0x51cafb
mov ecx, dword [esp + 0x70]
push ecx
call fcn.00594e98
add esp, 4
mov eax, edi
jmp 0x51cb3b
cmp dword [esp + 0x68], ebx
jb 0x51cb12
mov edx, dword [esp + 0x54]
push edx
call fcn.00594e98
add esp, 4
cmp dword [esp + 0x84], ebx
mov dword [esp + 0x68], 0xf
mov dword [esp + 0x64], esi
mov byte [esp + 0x54], 0
jb 0x51cb39
mov eax, dword [esp + 0x70]
push eax
call fcn.00594e98
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x8c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x74]
xor ecx, esp
call fcn.005b0968
add esp, 0x84
ret