Function at 0x10002550
Capabilities:
Get file size
Parse pe header
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1e0
push esi
push edi
mov dword [ebp - 0x174], 0
mov dword [ebp - 8], 0
cmp dword [ebp + 0xc], 0
je 0x10002665
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x1b0], eax
cmp dword [ebp - 0x1b0], 0xffffffff
jne 0x100025a8
xor al, al
jmp 0x10002d59
push 0
mov ecx, dword [ebp - 0x1b0]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x174], eax
mov edx, dword [ebp - 0x174]
push edx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x100025f0
mov eax, dword [ebp - 0x1b0]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x10002d59
mov dword [ebp - 0x1b4], 0
push 0
lea ecx, [ebp - 0x1b4]
push ecx
mov edx, dword [ebp - 0x174]
push edx
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 0x1b0]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 0x1b4]
cmp edx, dword [ebp - 0x174]
je 0x10002656
cmp dword [ebp - 8], 0
je 0x10002642
mov eax, dword [ebp - 8]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [ebp - 0x1b0]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x10002d59
mov edx, dword [ebp - 0x1b0]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1000269c
mov dword [ebp - 0x174], 0x10c0
push 0x10c0
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 8], eax
push 0x10c0
push section..data
mov eax, dword [ebp - 8]
push eax
call fcn.100032f0
add esp, 0xc
push 0
push 0x80
push 3
push 0
push 7
push 0x10000000
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x178], eax
cmp dword [ebp - 0x178], 0xffffffff
jne 0x100026e7
cmp dword [ebp - 8], 0
je 0x100026e0
mov edx, dword [ebp - 8]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor al, al
jmp 0x10002d59
push 0
mov eax, dword [ebp - 0x178]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0x138
jae 0x1000272f
cmp dword [ebp - 8], 0
je 0x1000271b
mov ecx, dword [ebp - 8]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edx, dword [ebp - 0x178]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x10002d59
mov eax, dword [ebp - 0x10]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x10002778
cmp dword [ebp - 8], 0
je 0x10002764
mov ecx, dword [ebp - 8]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edx, dword [ebp - 0x178]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x10002d59
mov dword [ebp - 0x180], 0
push 0
lea eax, [ebp - 0x180]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp - 0x178]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 0x180]
cmp ecx, dword [ebp - 0x10]
je 0x100027f1
cmp dword [ebp - 8], 0
je 0x100027c4
mov edx, dword [ebp - 8]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 4], 0
je 0x100027dd
mov eax, dword [ebp - 4]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [ebp - 0x178]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x10002d59
mov ecx, 0x10
mov esi, dword [ebp - 4]
lea edi, [ebp - 0x50]
rep movsd dword es:[edi], dword [esi]
movzx edx, word [ebp - 0x50]
cmp edx, 0x5a4d
je 0x10002849
cmp dword [ebp - 8], 0
je 0x10002823
mov eax, dword [ebp - 8]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 4], 0
je 0x1000283c
mov ecx, dword [ebp - 4]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edx, dword [ebp - 0x178]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 4]
add esi, dword [ebp - 0x14]
mov ecx, 0x3e
lea edi, [ebp - 0x148]
rep movsd dword es:[edi], dword [esi]
cmp dword [ebp - 0x148], 0x4550
je 0x100028a7
cmp dword [ebp - 8], 0
je 0x10002881
mov eax, dword [ebp - 8]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 4], 0
je 0x1000289a
mov ecx, dword [ebp - 4]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edx, dword [ebp - 0x178]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov dword [ebp - 0x1ac], eax
mov dword [ebp - 0x1a8], eax
mov dword [ebp - 0x1a4], eax
mov dword [ebp - 0x1a0], eax
mov dword [ebp - 0x19c], eax
mov dword [ebp - 0x198], eax
mov dword [ebp - 0x194], eax
mov dword [ebp - 0x190], eax
mov dword [ebp - 0x18c], eax
mov dword [ebp - 0x188], eax
mov dword [ebp - 0x1b8], 0
jmp 0x10002900
mov ecx, dword [ebp - 0x1b8]
add ecx, 1
mov dword [ebp - 0x1b8], ecx
movzx edx, word [ebp - 0x142]
cmp dword [ebp - 0x1b8], edx
jae 0x10002a45
mov eax, dword [ebp - 4]
add eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x1b8]
imul ecx, ecx, 0x28
lea esi, [eax + ecx + 0xf8]
mov ecx, 0xa
lea edi, [ebp - 0x1e0]
rep movsd dword es:[edi], dword [esi]
lea edx, [ebp - 0x1e0]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 3
jge 0x1000298e
cmp dword [ebp - 8], 0
je 0x10002961
mov eax, dword [ebp - 8]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 4], 0
je 0x1000297a
mov ecx, dword [ebp - 4]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edx, dword [ebp - 0x178]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x10002d59
mov eax, dword [ebp - 0x1a0]
cmp eax, dword [ebp - 0x1d4]
jae 0x100029c2
mov ecx, dword [ebp - 0x198]
cmp ecx, dword [ebp - 0x1cc]
jae 0x100029c2
mov ecx, 0xa
lea esi, [ebp - 0x1e0]
lea edi, [ebp - 0x1ac]
rep movsd dword es:[edi], dword [esi]
jmp 0x100028f1
mov edx, dword [ebp - 0x1a0]
cmp edx, dword [ebp - 0x1d4]
jae 0x100029de
mov eax, dword [ebp - 0x198]
cmp eax, dword [ebp - 0x1cc]
ja 0x100029fa
mov ecx, dword [ebp - 0x1a0]
cmp ecx, dword [ebp - 0x1d4]
jbe 0x10002a40
mov edx, dword [ebp - 0x198]
cmp edx, dword [ebp - 0x1cc]
jae 0x10002a40
cmp dword [ebp - 8], 0
je 0x10002a13
mov eax, dword [ebp - 8]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 4], 0
je 0x10002a2c
mov ecx, dword [ebp - 4]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edx, dword [ebp - 0x178]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x10002d59
jmp 0x100028f1
cmp dword [ebp + 0xc], 0
jne 0x10002a90
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x120]
mov dword [eax + 0x8e9], ecx
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x12c]
mov dword [edx + 0x8f6], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0xf8]
mov dword [ecx + 0x903], edx
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x74]
mov dword [eax + 0x913], ecx
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x78]
mov dword [edx + 0x923], eax
xor ecx, ecx
mov dword [ebp - 0x170], ecx
mov dword [ebp - 0x16c], ecx
mov dword [ebp - 0x168], ecx
mov dword [ebp - 0x164], ecx
mov dword [ebp - 0x160], ecx
mov dword [ebp - 0x15c], ecx
mov dword [ebp - 0x158], ecx
mov dword [ebp - 0x154], ecx
mov dword [ebp - 0x150], ecx
mov dword [ebp - 0x14c], ecx
cmp dword [ebp + 0xc], 0
jne 0x10002aec
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push 0
lea edx, [ebp - 0x170]
push edx
call entry0
add esp, 0xc
mov eax, dword [ebp - 0x198]
add eax, dword [ebp - 0x19c]
mov ecx, dword [ebp - 0x10]
sub ecx, eax
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0x110]
push edx
mov eax, dword [ebp - 0x1a4]
push eax
call fcn.10002510
add esp, 8
add eax, dword [ebp - 0x1a0]
mov dword [ebp - 0x164], eax
mov ecx, dword [ebp - 0x174]
mov dword [ebp - 0x168], ecx
mov edx, dword [ebp - 0x198]
add edx, dword [ebp - 0x19c]
mov dword [ebp - 0x15c], edx
mov eax, dword [ebp - 0x10c]
push eax
mov ecx, dword [ebp - 0x174]
push ecx
call fcn.10002510
add esp, 8
mov dword [ebp - 0x160], eax
mov dword [ebp - 0x14c], 0xe0000000
mov dx, word [ebp - 0x142]
add dx, 1
mov word [ebp - 0x142], dx
mov eax, dword [ebp - 0x10c]
push eax
mov ecx, dword [ebp - 0x174]
push ecx
call fcn.10002510
add esp, 8
add eax, dword [ebp - 0x12c]
mov dword [ebp - 0x12c], eax
mov edx, dword [ebp - 0x110]
push edx
mov eax, dword [ebp - 0x174]
push eax
call fcn.10002510
add esp, 8
add eax, dword [ebp - 0xf8]
mov dword [ebp - 0xf8], eax
cmp dword [ebp + 0xc], 0
jne 0x10002bce
mov ecx, dword [ebp - 0x164]
mov dword [ebp - 0x120], ecx
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x78], 0
mov ecx, 0x10
lea esi, [ebp - 0x50]
mov edi, dword [ebp - 4]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 4]
add edi, dword [ebp - 0x14]
mov ecx, 0x3e
lea esi, [ebp - 0x148]
rep movsd dword es:[edi], dword [esi]
mov edx, dword [ebp - 4]
add edx, dword [ebp - 0x14]
movzx eax, word [ebp - 0x142]
sub eax, 1
imul eax, eax, 0x28
lea edi, [edx + eax + 0xf8]
mov ecx, 0xa
lea esi, [ebp - 0x170]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0x10]
add ecx, dword [ebp - 0x160]
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x17c], eax
mov edx, dword [ebp - 0x10]
sub edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x17c]
push ecx
call fcn.100032f0
add esp, 0xc
mov edx, dword [ebp - 0x174]
push edx
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 0x17c]
add ecx, dword [ebp - 0x10]
sub ecx, dword [ebp - 0xc]
push ecx
call fcn.100032f0
add esp, 0xc
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 4]
add eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x17c]
add ecx, dword [ebp - 0x10]
sub ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 0x160]
push ecx
call fcn.100032f0
add esp, 0xc
push 0
push 0
push 0
mov edx, dword [ebp - 0x178]
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x184], 0
push 0
lea eax, [ebp - 0x184]
push eax
mov ecx, dword [ebp - 0x10c]
push ecx
mov edx, dword [ebp - 0x174]
push edx
call fcn.10002510
add esp, 8
add eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x17c]
push eax
mov ecx, dword [ebp - 0x178]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 8], 0
je 0x10002d12
mov edx, dword [ebp - 8]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 4], 0
je 0x10002d2b
mov eax, dword [ebp - 4]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 0x17c], 0
je 0x10002d4a
mov ecx, dword [ebp - 0x17c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edx, dword [ebp - 0x178]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret