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

Disassembly:
push 0xffffffffffffffff
push 0x5dc9b8
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x66d4f4]
xor eax, esp
mov dword [esp + 0x74], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x66d4f4]
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 0x5170c0
sub eax, edi
push eax
push ecx
lea ecx, [esp + 0x74]
call fcn.00408ea0
push 0xffffffffffffffff
push 2
lea ecx, [esp + 0x3c]
push ecx
lea ecx, [esp + 0x78]
mov dword [esp + 0xa0], esi
call fcn.00425380
push 0xffffffffffffffff
push esi
push eax
lea ecx, [esp + 0x78]
mov byte [esp + 0xa0], 1
call fcn.00407630
cmp dword [esp + 0x4c], 0x10
mov byte [esp + 0x94], 0
jb 0x517120
mov edx, dword [esp + 0x38]
push edx
call fcn.005a1b1d
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.00407630
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.00425830
cmp eax, 0xffffffff
je 0x5171b3
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.00516d40
push 1
push esi
lea edx, [esp + 0x1c]
push edx
lea ecx, [esp + 0x5c]
call fcn.00425830
cmp eax, 0xffffffff
jne 0x51718a
add edi, 1
cmp edi, 2
jl 0x517160
push 0xffffffffffffffff
push esi
lea eax, [esp + 0x58]
push eax
mov ecx, ebp
call fcn.004079f0
mov eax, dword [esp + 0x70]
mov ebx, 0x10
cmp dword [esp + 0x84], ebx
jae 0x5171e0
lea eax, [esp + 0x70]
mov ecx, dword [esp + 0x20]
push esi
push eax
call fcn.005a1650
mov edi, eax
cmp edi, 0xffffffff
mov dword [esp + 0x24], edi
je 0x5173ff
cmp edi, esi
je 0x5173ff
cmp dword [ebp + 0x18], ebx
jb 0x51720c
mov eax, dword [ebp + 4]
jmp 0x51720f
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 0x51728c
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
jne 0x51723c
lea ebx, [eax - 0x1f]
mov ecx, dword [esp + 0x20]
push edi
call fcn.005a1680
mov edi, 0x10
cmp dword [esp + 0x68], edi
jb 0x51725e
mov ecx, dword [esp + 0x54]
push ecx
call fcn.005a1b1d
add esp, 4
cmp dword [esp + 0x84], edi
mov dword [esp + 0x68], 0xf
mov dword [esp + 0x64], esi
mov byte [esp + 0x54], 0
jb 0x517285
mov edx, dword [esp + 0x70]
push edx
call fcn.005a1b1d
add esp, 4
mov eax, ebx
jmp 0x51743b
mov ebp, dword [esp + 0x20]
push edi
mov ecx, ebp
call fcn.005a16a0
mov dword [esp + 0x28], eax
or eax, edx
mov dword [esp + 0x2c], edx
jne 0x5172fc
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
mov ecx, ebp
call fcn.005a1680
mov edi, 0x10
cmp dword [esp + 0x68], edi
jb 0x5172cb
mov eax, dword [esp + 0x54]
push eax
call fcn.005a1b1d
add esp, 4
cmp dword [esp + 0x84], edi
mov dword [esp + 0x68], 0xf
mov dword [esp + 0x64], esi
mov byte [esp + 0x54], 0
jb 0x5172f2
mov ecx, dword [esp + 0x70]
push ecx
call fcn.005a1b1d
add esp, 4
mov eax, 1
jmp 0x51743b
push 0x10000
mov edi, 1
call fcn.005a1b18
xor ebp, ebp
add esp, 4
cmp dword [esp + 0x2c], ebp
mov ebx, eax
jb 0x517396
ja 0x517320
cmp dword [esp + 0x28], ebp
jbe 0x517396
mov edx, 0x10000
mov ecx, esi
add ecx, edx
mov eax, ebp
adc eax, 0
cmp eax, dword [esp + 0x2c]
jb 0x517342
ja 0x51733c
cmp ecx, dword [esp + 0x28]
jbe 0x517342
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.005a16d0
mov edi, eax
test edi, edi
je 0x517396
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x517396
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 0x517396
add esi, dword [esp + 0x1c]
adc ebp, 0
cmp ebp, dword [esp + 0x2c]
jb 0x517320
ja 0x517396
cmp esi, dword [esp + 0x28]
jb 0x517320
push ebx
call fcn.005a1b1d
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.005a1680
mov esi, 0x10
cmp dword [esp + 0x68], esi
jb 0x5173d0
mov eax, dword [esp + 0x54]
push eax
call fcn.005a1b1d
add esp, 4
cmp dword [esp + 0x84], esi
mov dword [esp + 0x68], 0xf
mov dword [esp + 0x64], 0
mov byte [esp + 0x54], 0
jb 0x5173fb
mov ecx, dword [esp + 0x70]
push ecx
call fcn.005a1b1d
add esp, 4
mov eax, edi
jmp 0x51743b
cmp dword [esp + 0x68], ebx
jb 0x517412
mov edx, dword [esp + 0x54]
push edx
call fcn.005a1b1d
add esp, 4
cmp dword [esp + 0x84], ebx
mov dword [esp + 0x68], 0xf
mov dword [esp + 0x64], esi
mov byte [esp + 0x54], 0
jb 0x517439
mov eax, dword [esp + 0x70]
push eax
call fcn.005a1b1d
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.005bd2d7
add esp, 0x84
ret