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

Disassembly:
push 0xffffffffffffffff
push 0x6080bb
mov eax, dword fs:[0]
push eax
sub esp, 0x128
mov eax, dword [0x6687b8]
xor eax, esp
mov dword [esp + 0x120], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x6687b8]
xor eax, esp
push eax
lea eax, [esp + 0x13c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x14c]
xor ebp, ebp
push ebp
push 0x80
push 3
push ebp
push 3
push 0xc0000000
mov esi, ecx
push eax
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], ebp
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x519931
call fcn.0040f010
jmp 0x519934
mov dword [esi + 0x28], eax
mov eax, dword [esi + 0x28]
add esi, 0x28
cmp eax, ebp
mov dword [esp + 0x30], esi
je 0x51999f
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x54], ebp
push ebp
push 4
push 2
lea esi, [esp + 0x58]
mov dword [esp + 0x150], ebp
call fcn.0050dcc0
cmp eax, ebp
mov dword [esp + 0x14], eax
jge 0x5199a6
mov eax, dword [esp + 0x4c]
xor esi, esi
cmp eax, ebp
je 0x519983
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test eax, eax
jne 0x519983
call fcn.0040f010
mov esi, eax
mov eax, dword [esp + 0x54]
cmp eax, ebp
je 0x51999f
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x51999f
cmp esi, ebp
jl 0x51999f
call fcn.0040f010
xor eax, eax
jmp 0x519ddc
mov esi, dword [esp + 0x4c]
cmp dword [esi], 0x51554432
mov dword [esp + 0x18], ebp
jne 0x519d39
cmp word [esi + 4], 3
jne 0x519d39
mov eax, dword [esi + 0x3c]
mov ebx, dword [esp + 0x50]
add eax, 0x40
cmp eax, ebx
ja 0x519d39
mov ecx, 0x10
lea edi, [esp + 0x6c]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x28]
mov eax, dword [edi + 8]
mov ecx, dword [eax + 0x1c]
mov esi, dword [esp + 0x30]
mov dword [esp + 0x74], ecx
mov edx, dword [eax + 0x20]
mov dword [esp + 0x78], edx
mov ecx, dword [eax + 0x24]
mov dword [esp + 0x7c], ecx
mov edx, dword [eax + 0x28]
mov ecx, dword [esi]
push ebp
lea eax, [esp + 0x24]
push eax
push ebp
push ecx
mov dword [esp + 0x90], edx
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x519a2e
call fcn.0040f010
mov ecx, dword [esi]
push ebp
lea edx, [esp + 0x20]
push edx
push 0x40
lea eax, [esp + 0x78]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x519a4d
call fcn.0040f010
mov esi, dword [esp + 0x4c]
mov eax, dword [esi + 0x3c]
add eax, 0x40
cmp byte [edi + 0x30], 0
mov dword [esp + 0x18], eax
jne 0x519d41
jmp 0x519a74
mov esi, dword [esp + 0x4c]
cmp dword [esp + 0x18], ebx
jae 0x519d41
mov ecx, dword [esp + 0x18]
lea edx, [ecx + 4]
cmp edx, ebx
lea edi, [esi + ecx]
ja 0x519d39
movzx eax, word [edi + 2]
cmp ax, 4
jbe 0x519d39
movzx edx, ax
lea eax, [edx + ecx]
cmp eax, ebx
ja 0x519d39
movzx eax, word [edi]
cmp ax, 0x7747
jne 0x519c22
mov bl, byte [edi + 0xf]
movzx ecx, byte [edi + 0xe]
movzx esi, bl
add ecx, esi
lea eax, [ecx + ecx + 0x10]
cmp edx, eax
jb 0x519d39
push 0x82
lea ecx, [esp + 0xb2]
push ebp
push ecx
mov dword [esp + 0x48], ebp
mov word [esp + 0xb8], bp
call fcn.005da970
movzx eax, byte [edi + 0xe]
add esp, 0xc
cmp bl, 0x40
lea edx, [edi + 0x10]
lea ecx, [edi + eax*2 + 0x10]
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], edx
mov eax, esi
jb 0x519b12
mov eax, 0x40
push eax
push ecx
lea eax, [esp + 0xb4]
push eax
call fcn.005d31ba
mov esi, dword [esp + 0x40]
mov ebx, dword [esp + 0x44]
add esp, 0xc
call fcn.0051bd80
cmp eax, ebp
je 0x519bf5
push ebp
lea ecx, [esp + 0xb0]
push ecx
push esi
push eax
mov eax, ebx
call fcn.00517570
cmp eax, ebp
je 0x519bf5
mov ebx, dword [esp + 0x28]
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x38]
push eax
mov eax, dword [ebx + 8]
mov dword [esp + 0x24], ebp
call fcn.00521190
mov eax, dword [esp + 0x1c]
cmp eax, ebp
je 0x519d23
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [ebx + 8]
lea esi, [esp + 0x38]
mov dword [esp + 0x20], ebp
call fcn.00521240
mov ecx, dword [esp + 0x1c]
cmp ecx, ebp
je 0x519d23
mov eax, dword [ebx + 8]
mov esi, 1
push esi
lea edx, [esp + 0x20]
push edx
movzx edx, byte [edi + 0xd]
push ecx
movzx ecx, byte [edi + 0xc]
push ecx
mov ecx, dword [edi + 4]
push edx
movzx edx, byte [edi + 0xf]
push ecx
push edx
lea ecx, [esp + 0xc8]
push ecx
push eax
mov dword [esp + 0x40], ebp
call fcn.00521330
mov ecx, dword [esp + 0x1c]
cmp ecx, ebp
je 0x519d2d
cmp dword [ecx + 8], ebp
jbe 0x519bee
test byte [ecx + 0xe], 0x80
jne 0x519bee
cmp eax, 2
jne 0x519bee
add dword [esp + 0x2c], esi
mov edx, dword [esp + 0x18]
mov dword [ecx + 4], edx
mov ebx, dword [esp + 0x50]
movzx edx, word [edi + 2]
mov eax, dword [esp + 0x18]
add eax, edx
cmp eax, ebx
mov dword [esp + 0x18], eax
jae 0x519d33
mov eax, dword [esp + 0x28]
cmp byte [eax + 0x30], 0
je 0x519a70
jmp 0x519d41
cmp ax, 0x44f7
jne 0x519bf9
movzx eax, byte [edi + 0x13]
lea ecx, [eax + eax + 0x14]
cmp edx, ecx
jb 0x519d39
mov ecx, dword [edi + 0xc]
cmp ecx, dword [esp + 0x18]
jae 0x519d39
lea eax, [esi + ecx]
lea esi, [ecx + 4]
cmp esi, ebx
ja 0x519d39
add edx, ecx
cmp edx, ebx
ja 0x519d39
cmp word [eax], 0x7747
jne 0x519d39
movzx esi, byte [eax + 0xe]
movzx edx, byte [eax + 0xf]
add edx, esi
movzx esi, word [eax + 2]
lea edx, [edx + edx + 0x10]
cmp esi, edx
jb 0x519d39
add edx, ecx
cmp edx, ebx
ja 0x519d39
mov dword [esp + 0x40], ebp
mov dword [esp + 0x44], ebp
lea ecx, [eax + 0x10]
mov dword [esp + 0x48], ebp
movzx edx, byte [eax + 0xe]
mov dword [esp + 0x44], ecx
movzx ecx, byte [eax + 0xe]
lea edx, [eax + edx*2 + 0x10]
mov dword [esp + 0x40], ecx
movzx eax, byte [eax + 0xf]
mov ecx, dword [esp + 0x28]
mov ecx, dword [ecx + 8]
push eax
push edx
lea edx, [esp + 0x48]
push edx
lea eax, [esp + 0x28]
mov dword [esp + 0x28], ebp
call fcn.005194a0
cmp eax, ebp
je 0x519bf9
mov ecx, dword [esp + 0x1c]
cmp ecx, ebp
je 0x519bf9
push 1
lea edx, [esp + 0x20]
push edx
movzx edx, byte [edi + 0x10]
push edx
movzx edx, byte [edi + 0x11]
push edx
mov edx, dword [edi + 4]
push edx
mov edx, dword [esp + 0x3c]
mov edx, dword [edx + 8]
push eax
mov al, byte [edi + 0x13]
push ecx
lea ecx, [edi + 0x14]
mov dword [esp + 0x38], ebp
call fcn.005191c0
mov eax, dword [esp + 0x1c]
cmp eax, ebp
je 0x519d23
mov ecx, dword [esp + 0x18]
mov dword [eax + 0xc], ecx
jmp 0x519bf9
mov dword [esp + 0x14], 1
jmp 0x519d41
mov dword [esp + 0x14], esi
jmp 0x519d41
mov dword [esp + 0x14], ebp
jmp 0x519d41
mov dword [esp + 0x14], 0x8007000b
lea esi, [esp + 0x4c]
call fcn.0050df50
cmp dword [esp + 0x14], ebp
jge 0x519da0
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x30]
push ebp
push edi
call fcn.00433ef0
cmp edi, ebp
jne 0x519da0
push 0x3c
lea ecx, [esp + 0x74]
push ebp
push ecx
call fcn.005da970
add esp, 0xc
push ebp
push ebp
push esi
xor edx, edx
mov dword [esp + 0x78], 0x51554432
mov word [esp + 0x7c], 3
mov word [esp + 0x7e], bp
call fcn.00433e80
push esi
mov ecx, 0x40
lea edx, [esp + 0x70]
call fcn.00433ec0
mov eax, dword [esp + 0x4c]
xor esi, esi
cmp eax, ebp
je 0x519dbc
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test eax, eax
jne 0x519dbc
call fcn.0040f010
mov esi, eax
mov eax, dword [esp + 0x54]
cmp eax, ebp
je 0x519dd8
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x519dd8
cmp esi, ebp
jl 0x519dd8
call fcn.0040f010
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x13c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x120]
xor ecx, esp
call fcn.005d28b3
add esp, 0x134
ret 4