Function at 0x470280
Capabilities:
Get file size
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52df40
mov eax, dword fs:[0]
push eax
sub esp, 0x7c
push ebx
push esi
push edi
mov eax, dword [0x58e5a4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x1c], esi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x3c], 0
cmp edi, 0xffffffff
jne 0x4702ca
push 6
jmp 0x4709ba
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 0x3e8], eax
cmp eax, 0xffffffff
je 0x4709c0
push 0
push 0
push 0
push 2
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [esi + 8], eax
test eax, eax
je 0x4709c0
push 0
push 0
push 0
push 0
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFileEx]
mov edx, eax
mov dword [esi + 0xc], edx
test edx, edx
je 0x4709c0
mov eax, 0x5a4d
cmp word [edx], ax
jne 0x4709b5
mov ecx, dword [edx + 0x3c]
mov edi, dword [esi + 0x3e8]
mov dword [esi + 0x3dc], ecx
mov dword [esi + 0x3d0], 0
mov eax, dword [edx + 0x3c]
add eax, 7
mov dword [ebp + 8], ecx
and eax, 0xfffffff8
mov dword [esi + 0x3d4], eax
cmp ecx, edi
ja 0x4709b5
lea eax, [ecx + 0xf8]
cmp eax, edi
ja 0x4709b5
movups xmm0, xmmword [edx]
lea eax, [esi + 0x58]
mov edi, eax
movups xmmword [esi + 0x18], xmm0
movups xmm0, xmmword [edx + 0x10]
movups xmmword [esi + 0x28], xmm0
movups xmm0, xmmword [edx + 0x20]
movups xmmword [esi + 0x38], xmm0
movups xmm0, xmmword [edx + 0x30]
movups xmmword [esi + 0x48], xmm0
lea esi, [ecx + edx]
mov ecx, 0x3e
rep movsd dword es:[edi], dword [esi]
cmp dword [eax], 0x4550
je 0x4703ab
push 0xbf
jmp 0x4709ba
mov edi, dword [ebp - 0x1c]
movzx eax, word [edi + 0x6c]
test ax, ax
je 0x470847
mov ecx, dword [ebp + 8]
add ecx, 0x18
add ecx, eax
movzx eax, word [edi + 0x5e]
mov dword [edi + 0x3e0], ecx
cmp eax, 0x10
ja 0x470847
lea eax, [eax + eax*4]
shl eax, 3
push eax
lea eax, [edx + ecx]
push eax
lea eax, [edi + 0x150]
push eax
call fcn.004d4210
movzx eax, word [edi + 0x5e]
xor esi, esi
xor ecx, ecx
mov dword [ebp - 0x20], esi
add esp, 0xc
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x2c], esi
cmp cx, ax
jae 0x4704a9
lea esi, [edi + 0x164]
mov dword [ebp + 8], eax
mov ecx, str..detour
lea eax, [esi - 0x14]
nop dword [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x470440
test dl, dl
je 0x47043c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x470440
add eax, 2
add ecx, 2
test dl, dl
jne 0x470420
xor eax, eax
jmp 0x470445
sbb eax, eax
or eax, 1
test eax, eax
jne 0x470499
mov eax, dword [edi + 0xc]
mov ecx, dword [esi]
add eax, ecx
movups xmm2, xmmword [eax + 0x20]
movups xmm0, xmmword [eax]
movups xmm1, xmmword [eax + 0x10]
psrldq xmm2, 0xc
movups xmmword [ebp - 0x88], xmm0
movups xmm0, xmmword [eax + 0x30]
movd edx, xmm2
movups xmmword [ebp - 0x58], xmm0
movd dword [ebp - 0x20], xmm1
test edx, edx
je 0x47048b
lea eax, [ecx + 0x40]
mov dword [edi + 0x3d4], edx
mov dword [edi + 0x3d0], eax
mov eax, dword [esi - 8]
mov edx, dword [esi - 4]
add edx, eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], edx
add esi, 0x28
sub dword [ebp + 8], 1
jne 0x470413
mov esi, dword [ebp - 0x20]
push dword [edi + 0xd8]
mov ecx, edi
call fcn.00470aa0
push esi
mov ecx, edi
mov dword [ebp + 8], eax
call fcn.00470aa0
mov ecx, dword [ebp + 8]
mov esi, eax
test esi, esi
cmove esi, ecx
mov dword [ebp - 0x18], esi
test ecx, ecx
je 0x470847
test esi, esi
je 0x470847
xor edx, edx
mov eax, ecx
cmp dword [eax], 0
jne 0x4704ed
cmp dword [eax + 0x10], 0
je 0x4704f3
inc edx
add eax, 0x14
jmp 0x4704e2
mov dword [ebp - 0x34], edx
lea eax, [edi + 0x400]
mov dword [ebp - 0x24], eax
mov dword [eax], 0
mov dword [ebp - 0x30], 0
test edx, edx
je 0x4707d7
push dword [ecx + 0xc]
mov ecx, edi
call fcn.00470aa0
mov dword [ebp - 0x20], eax
test eax, eax
je 0x470847
push 0x24
call fcn.004d2477
mov esi, eax
add esp, 4
mov dword [ebp - 0x40], esi
mov dword [ebp - 4], 0
test esi, esi
je 0x470583
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0x20], 0
mov dword [esi + 0x1c], 0
jmp 0x470585
xor esi, esi
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x470840
mov eax, dword [ebp - 0x24]
push dword [ebp - 0x20]
mov dword [ebp - 0x24], esi
mov dword [eax], esi
inc dword [edi + 0x404]
call fcn.0046f940
add esp, 4
mov dword [esi + 0x20], eax
test eax, eax
je 0x4709c0
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
mov dword [esi + 0x10], eax
mov eax, dword [ecx + 0x10]
mov dword [esi + 0x14], eax
mov eax, dword [ecx + 8]
mov dword [esi + 0x18], eax
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 4], 0
mov eax, dword [ecx + 0x10]
cmp eax, dword [ebp - 0x28]
jb 0x470601
cmp eax, dword [ebp - 0x2c]
jae 0x470601
mov dword [esi + 0x1c], 0
mov dword [esi + 4], 1
jmp 0x4707c1
mov eax, dword [ebp - 0x18]
mov ecx, edi
push dword [eax + 0xc]
call fcn.00470aa0
test eax, eax
je 0x470847
push eax
call fcn.0046f940
add esp, 4
mov dword [esi + 0x1c], eax
test eax, eax
je 0x4709c0
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
test ecx, ecx
jne 0x470636
mov ecx, dword [eax + 0x10]
push ecx
mov ecx, edi
call fcn.00470aa0
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x14], eax
mov eax, dword [ecx]
test eax, eax
jne 0x47064d
mov eax, dword [ecx + 0x10]
push eax
mov ecx, edi
call fcn.00470aa0
mov dword [ebp - 0x10], eax
xor edi, edi
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4707b7
cmp dword [eax], edi
je 0x4707b7
nop dword [eax]
inc edi
cmp dword [eax + edi*4], 0
jne 0x470670
test edi, edi
je 0x4707b7
xor ecx, ecx
mov dword [esi + 0xc], edi
mov eax, edi
mov dword [ebp - 0x44], edi
mov edx, 0x14
mul edx
seto cl
neg ecx
or ecx, eax
xor eax, eax
add ecx, 4
setb al
neg eax
or eax, ecx
push eax
call fcn.004d2a98
add esp, 4
mov dword [ebp - 0x48], eax
mov dword [ebp - 4], 1
test eax, eax
je 0x4706da
push 0x46f230
push 0x46f080
push edi
mov dword [eax], edi
add eax, 4
push 0x14
push eax
mov dword [ebp - 0x20], eax
call fcn.004d2aab
mov eax, dword [ebp - 0x20]
jmp 0x4706dc
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov dword [esi + 8], eax
test eax, eax
je 0x470840
xor ecx, ecx
mov dword [ebp - 0x20], ecx
test edi, edi
je 0x4707b7
mov ecx, dword [ebp - 0x14]
lea esi, [eax + 4]
mov eax, dword [ebp - 0x10]
sub ecx, eax
mov dword [ebp - 0x14], ecx
nop dword [eax]
xor edx, edx
mov dword [esi], 0
mov dword [esi + 4], 0
mov word [esi - 4], dx
mov dword [esi + 0xc], edx
mov dword [esi + 8], edx
mov eax, dword [ecx + eax]
test eax, eax
jns 0x47073a
movzx eax, ax
mov dword [esi], eax
mov dword [esi + 4], eax
jmp 0x47079c
mov ecx, dword [ebp - 0x1c]
push eax
call fcn.00470aa0
test eax, eax
je 0x470765
mov cx, word [eax]
add eax, 2
push eax
mov word [esi - 4], cx
call fcn.0046f940
add esp, 4
mov dword [esi + 0xc], eax
test eax, eax
je 0x4709c0
mov eax, dword [ebp - 0x10]
mov eax, dword [eax]
test eax, eax
jns 0x470778
movzx eax, ax
mov dword [esi], eax
mov dword [esi + 4], eax
jmp 0x47079c
mov ecx, dword [ebp - 0x1c]
push eax
call fcn.00470aa0
test eax, eax
je 0x47079c
add eax, 2
push eax
call fcn.0046f940
add esp, 4
mov dword [esi + 8], eax
test eax, eax
je 0x4709c0
mov eax, dword [ebp - 0x10]
add esi, 0x14
inc dword [ebp - 0x20]
add eax, 4
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x20], edi
jb 0x470710
add dword [ebp - 0x18], 0x14
mov edi, dword [ebp - 0x1c]
mov ecx, dword [ebp + 8]
mov esi, dword [ebp - 0x30]
add ecx, 0x14
inc esi
mov dword [ebp + 8], ecx
mov dword [ebp - 0x30], esi
cmp esi, dword [ebp - 0x34]
jb 0x470514
movzx eax, word [edi + 0x5e]
xor ecx, ecx
mov dword [edi + 0x3e4], 0
mov dword [ebp - 0x30], 0
cmp cx, ax
jae 0x470958
lea esi, [edi + 0x164]
mov dword [ebp - 0x20], eax
mov dword [ebp + 8], esi
mov eax, dword [esi]
add eax, dword [esi - 4]
cmp eax, ecx
cmova ecx, eax
lea eax, [esi - 0x14]
mov dword [ebp - 0x34], ecx
mov dword [edi + 0x3e4], ecx
mov ecx, str..detour
nop
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x470851
test dl, dl
je 0x47083c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x470851
add eax, 2
add ecx, 2
test dl, dl
jne 0x470820
xor eax, eax
jmp 0x470856
push 0xe
jmp 0x4709ba
push 0xc0
jmp 0x4709ba
sbb eax, eax
or eax, 1
test eax, eax
jne 0x47093a
mov esi, dword [esi]
mov edx, dword [edi + 0xc]
add edx, esi
movups xmm1, xmmword [edx]
movups xmm0, xmmword [edx + 0x30]
movups xmm2, xmmword [edx + 0x10]
movups xmm3, xmmword [edx + 0x20]
movups xmmword [ebp - 0x58], xmm0
movaps xmm0, xmm1
movd eax, xmm1
psrldq xmm0, 8
movd ecx, xmm0
movaps xmm0, xmm2
movups xmmword [ebp - 0x88], xmm1
test ecx, ecx
psrldq xmm0, 4
cmove ecx, eax
mov eax, dword [ebp - 0x7c]
sub eax, ecx
mov dword [ebp - 0x3c], eax
lea eax, [edx + ecx]
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
add eax, esi
movd dword [edi + 0xdc], xmm0
mov esi, dword [ebp + 8]
cmp eax, ecx
movaps xmm0, xmm2
movd dword [edi + 0xd8], xmm2
psrldq xmm0, 8
cmova ecx, eax
mov eax, dword [ebp - 0x20]
movd dword [edi + 0x128], xmm0
add eax, 0xffff
movaps xmm0, xmm3
movd dword [edi + 0x130], xmm3
psrldq xmm2, 0xc
psrldq xmm0, 4
psrldq xmm3, 8
mov dword [edi + 0x3e4], ecx
mov dword [ebp - 0x20], eax
mov word [edi + 0x5e], ax
movd dword [edi + 0x12c], xmm2
movd dword [edi + 0x134], xmm0
mov dword [edi + 0xb0], 0
movd dword [edi + 0xa8], xmm3
mov dword [edi + 0x408], 1
jmp 0x47093d
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x30]
add esi, 0x28
mov eax, dword [ebp - 0x20]
inc edx
movzx eax, ax
mov dword [ebp - 0x30], edx
mov dword [ebp + 8], esi
cmp edx, eax
jb 0x470803
push 0xc
call fcn.004d2477
add esp, 4
mov dword [ebp + 8], eax
mov dword [ebp - 4], 2
test eax, eax
je 0x470984
mov ecx, dword [ebp - 0x38]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x3c]
mov dword [eax + 4], ecx
mov dword [eax + 8], 0
jmp 0x470986
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov dword [edi + 4], eax
test eax, eax
jne 0x47099c
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4