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

Disassembly:
push 0xffffffffffffffff
push 0x5d27c8
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x65d4e4]
xor eax, esp
mov dword [esp + 0x74], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x65d4e4]
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 0x51d760
sub eax, edi
push eax
push ecx
lea ecx, [esp + 0x74]
call fcn.00409790
push 0xffffffffffffffff
push 2
lea ecx, [esp + 0x3c]
push ecx
lea ecx, [esp + 0x78]
mov dword [esp + 0xa0], esi
call fcn.00425ed0
push 0xffffffffffffffff
push esi
push eax
lea ecx, [esp + 0x78]
mov byte [esp + 0xa0], 1
call fcn.00407e40
cmp dword [esp + 0x4c], 0x10
mov byte [esp + 0x94], 0
jb 0x51d7c0
mov edx, dword [esp + 0x38]
push edx
call fcn.00595eb8
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.00407e40
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.004264e0
cmp eax, 0xffffffff
je 0x51d853
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.0051d3e0
push 1
push esi
lea edx, [esp + 0x1c]
push edx
lea ecx, [esp + 0x5c]
call fcn.004264e0
cmp eax, 0xffffffff
jne 0x51d82a
add edi, 1
cmp edi, 2
jl 0x51d800
push 0xffffffffffffffff
push esi
lea eax, [esp + 0x58]
push eax
mov ecx, ebp
call fcn.00408200
mov eax, dword [esp + 0x70]
mov ebx, 0x10
cmp dword [esp + 0x84], ebx
jae 0x51d880
lea eax, [esp + 0x70]
mov ecx, dword [esp + 0x20]
push esi
push eax
call fcn.005959f0
mov edi, eax
cmp edi, 0xffffffff
mov dword [esp + 0x24], edi
je 0x51da9f
cmp edi, esi
je 0x51da9f
cmp dword [ebp + 0x18], ebx
jb 0x51d8ac
mov eax, dword [ebp + 4]
jmp 0x51d8af
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 0x51d92c
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
jne 0x51d8dc
lea ebx, [eax - 0x1f]
mov ecx, dword [esp + 0x20]
push edi
call fcn.00595a20
mov edi, 0x10
cmp dword [esp + 0x68], edi
jb 0x51d8fe
mov ecx, dword [esp + 0x54]
push ecx
call fcn.00595eb8
add esp, 4
cmp dword [esp + 0x84], edi
mov dword [esp + 0x68], 0xf
mov dword [esp + 0x64], esi
mov byte [esp + 0x54], 0
jb 0x51d925
mov edx, dword [esp + 0x70]
push edx
call fcn.00595eb8
add esp, 4
mov eax, ebx
jmp 0x51dadb
mov ebp, dword [esp + 0x20]
push edi
mov ecx, ebp
call fcn.00595a40
mov dword [esp + 0x28], eax
or eax, edx
mov dword [esp + 0x2c], edx
jne 0x51d99c
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
mov ecx, ebp
call fcn.00595a20
mov edi, 0x10
cmp dword [esp + 0x68], edi
jb 0x51d96b
mov eax, dword [esp + 0x54]
push eax
call fcn.00595eb8
add esp, 4
cmp dword [esp + 0x84], edi
mov dword [esp + 0x68], 0xf
mov dword [esp + 0x64], esi
mov byte [esp + 0x54], 0
jb 0x51d992
mov ecx, dword [esp + 0x70]
push ecx
call fcn.00595eb8
add esp, 4
mov eax, 1
jmp 0x51dadb
push 0x10000
mov edi, 1
call fcn.00595ebd
xor ebp, ebp
add esp, 4
cmp dword [esp + 0x2c], ebp
mov ebx, eax
jb 0x51da36
ja 0x51d9c0
cmp dword [esp + 0x28], ebp
jbe 0x51da36
mov edx, 0x10000
mov ecx, esi
add ecx, edx
mov eax, ebp
adc eax, 0
cmp eax, dword [esp + 0x2c]
jb 0x51d9e2
ja 0x51d9dc
cmp ecx, dword [esp + 0x28]
jbe 0x51d9e2
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.00595a70
mov edi, eax
test edi, edi
je 0x51da36
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x51da36
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 0x51da36
add esi, dword [esp + 0x1c]
adc ebp, 0
cmp ebp, dword [esp + 0x2c]
jb 0x51d9c0
ja 0x51da36
cmp esi, dword [esp + 0x28]
jb 0x51d9c0
push ebx
call fcn.00595eb8
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.00595a20
mov esi, 0x10
cmp dword [esp + 0x68], esi
jb 0x51da70
mov eax, dword [esp + 0x54]
push eax
call fcn.00595eb8
add esp, 4
cmp dword [esp + 0x84], esi
mov dword [esp + 0x68], 0xf
mov dword [esp + 0x64], 0
mov byte [esp + 0x54], 0
jb 0x51da9b
mov ecx, dword [esp + 0x70]
push ecx
call fcn.00595eb8
add esp, 4
mov eax, edi
jmp 0x51dadb
cmp dword [esp + 0x68], ebx
jb 0x51dab2
mov edx, dword [esp + 0x54]
push edx
call fcn.00595eb8
add esp, 4
cmp dword [esp + 0x84], ebx
mov dword [esp + 0x68], 0xf
mov dword [esp + 0x64], esi
mov byte [esp + 0x54], 0
jb 0x51dad9
mov eax, dword [esp + 0x70]
push eax
call fcn.00595eb8
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.005b1988
add esp, 0x84
ret