Function at 0x10005f90
Capabilities:
Check if file exists
Get file attributes
Get file size
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10050f41
mov eax, dword fs:[0]
push eax
sub esp, 0x2d8
mov eax, dword [0x10069008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x200], edx
mov edi, ecx
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x1f8], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x244], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x218], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x21c], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x248], eax
mov eax, dword [ebp + 0x28]
mov dword [ebp - 0x240], eax
mov eax, dword [ebp + 0x30]
mov dword [ebp - 0x1f0], eax
mov eax, dword [ebp + 0x34]
mov dword [ebp - 0x238], eax
mov eax, dword [ebp + 0x38]
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x234], eax
mov eax, dword [ebp + 0x3c]
mov dword [ebp - 0x24c], eax
mov eax, dword [ebp + 0x40]
mov dword [ebp - 0x23c], eax
mov eax, dword [ebp + 0x44]
mov dword [ebp - 0x230], eax
mov eax, dword [ebp + 0x48]
mov dword [ebp - 0x22c], eax
mov eax, dword [ebp + 0x4c]
mov dword [ebp - 0x228], eax
mov eax, dword [ebp + 0x50]
mov dword [ebp - 0x224], eax
mov eax, dword [ebp + 0x54]
mov ecx, dword [ebp + 0x24]
mov dword [ebp - 0x220], eax
mov eax, dword [ebp + 0x58]
mov dword [ebp - 0x214], eax
mov eax, dword [ebp + 0x5c]
mov dword [ebp - 0x210], eax
mov eax, dword [ebp + 0x60]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x1f4], eax
mov eax, dword [ebp - 0x244]
mov dword [edx], 0
push 0
mov dword [ebp - 0x204], ecx
mov dword [eax], 0
mov eax, dword [ebp - 0x218]
push 0x10061850
mov dword [ebp - 0x208], edx
mov dword [ebp - 0x1fc], 0
mov dword [eax], 0
mov eax, dword [ebp - 0x21c]
mov dword [eax], 0
mov eax, dword [ebp - 0x248]
mov dword [eax], 0
mov dword [ecx], 0
mov ecx, dword [ebp - 0x240]
call fcn.100028f0
mov eax, dword [ebp - 0x1f0]
xor ecx, ecx
push ecx
push 0x10061850
mov dword [eax], 0
mov eax, dword [ebp - 0x238]
mov dword [eax], 0
mov eax, dword [ebp - 0x234]
mov word [eax], cx
mov eax, dword [ebp - 0x24c]
mov word [eax], cx
mov eax, dword [ebp - 0x23c]
mov dword [eax], ecx
mov eax, dword [ebp - 0x230]
mov dword [eax], ecx
mov eax, dword [ebp - 0x22c]
mov dword [eax], ecx
mov eax, dword [ebp - 0x228]
mov dword [eax], ecx
mov eax, dword [ebp - 0x224]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x220]
call fcn.100028f0
mov eax, dword [ebp - 0x214]
mov ecx, dword [ebp - 0x200]
push 0
push 0x10061850
mov dword [eax], 0
call fcn.100028f0
mov ecx, dword [ebp - 0x210]
push 0
push 0x10061850
call fcn.100028f0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 0
push 0xa000000
push 3
push 0
push 7
push 0x80000000
push edi
mov dword [esi], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x1ec], edi
cmp edi, 0xffffffff
jne 0x100062dc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x27c]
call fcn.10004820
push eax
mov edx, str.Error_opening_file
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x28]
call fcn.10011040
mov esi, dword [ebp - 0x1f4]
mov edi, eax
add esp, 4
cmp esi, edi
je 0x10006245
mov ecx, dword [esi + 0x14]
cmp ecx, 8
jb 0x10006215
mov eax, dword [esi]
lea ecx, [ecx*2 + 2]
cmp ecx, 0x1000
jb 0x1000620b
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10006b5e
mov eax, edx
push ecx
push eax
call fcn.10015573
add esp, 8
mov dword [esi + 0x10], 0
xor eax, eax
mov dword [esi + 0x14], 7
mov word [esi], ax
movups xmm0, xmmword [edi]
movups xmmword [esi], xmm0
movq xmm0, qword [edi + 0x10]
movq qword [esi + 0x10], xmm0
mov dword [edi + 0x10], eax
mov dword [edi + 0x14], 7
mov word [edi], ax
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x1000627f
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10006275
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10006b5e
push edx
push ecx
call fcn.10015573
add esp, 8
mov edx, dword [ebp - 0x268]
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
cmp edx, 8
jb 0x10006b41
mov ecx, dword [ebp - 0x27c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x100062cd
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10006b5e
push edx
push ecx
call fcn.10015573
add esp, 8
jmp 0x10006b41
mov edx, dword [ebp - 0x210]
mov ecx, edi
call fcn.10005540
lea eax, [ebp - 0x30]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x10006433
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x27c]
call fcn.10004820
push eax
mov edx, str.Error_getting_filesize
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x28]
call fcn.10011040
mov esi, dword [ebp - 0x1f4]
mov edi, eax
add esp, 4
cmp esi, edi
je 0x1000639c
mov ecx, dword [esi + 0x14]
cmp ecx, 8
jb 0x1000636c
mov eax, dword [esi]
lea ecx, [ecx*2 + 2]
cmp ecx, 0x1000
jb 0x10006362
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10006b63
mov eax, edx
push ecx
push eax
call fcn.10015573
add esp, 8
mov dword [esi + 0x10], 0
xor eax, eax
mov dword [esi + 0x14], 7
mov word [esi], ax
movups xmm0, xmmword [edi]
movups xmmword [esi], xmm0
movq xmm0, qword [edi + 0x10]
movq qword [esi + 0x10], xmm0
mov dword [edi + 0x10], eax
mov dword [edi + 0x14], 7
mov word [edi], ax
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x100063d6
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x100063cc
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10006b63
push edx
push ecx
call fcn.10015573
add esp, 8
mov edx, dword [ebp - 0x268]
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
cmp edx, 8
jb 0x10006b34
mov ecx, dword [ebp - 0x27c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10006424
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10006b63
push edx
push ecx
call fcn.10015573
add esp, 8
jmp 0x10006b34
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x10006458
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x1f4]
push 0x1f
push str.Error_filesize_larger_than_4GB
call fcn.100028f0
jmp 0x10006b3a
mov edx, dword [ebp - 0x214]
mov ecx, dword [ebp - 0x30]
mov dword [edx], ecx
test eax, eax
jl 0x10006b3a
jg 0x10006476
cmp ecx, 0x40
jb 0x10006b3a
mov esi, dword [ebp - 0x1f4]
lea edx, [ebp - 0x98]
push esi
push 0x40
mov ecx, edi
call fcn.10004ab0
add esp, 8
test eax, eax
jne 0x10006b3a
mov eax, 0x5a4d
cmp ax, word [ebp - 0x98]
jne 0x10006b3a
cmp dword [ebp - 0x2c], 0
mov edx, dword [ebp - 0x5c]
lea eax, [edx + 0x108]
jl 0x10006b3a
jg 0x100064c7
cmp dword [ebp - 0x30], eax
jb 0x10006b3a
push esi
mov ecx, edi
call fcn.10004c60
add esp, 4
cmp eax, 0xffffffff
je 0x10006b3a
push esi
push 0x108
lea edx, [ebp - 0x1a0]
mov ecx, edi
call fcn.10004ab0
add esp, 8
test eax, eax
jne 0x10006b3a
cmp dword [ebp - 0x1a0], 0x4550
je 0x10006518
push 0x1c
push str.Error_no_IMAGE_NT_SIGNATURE
mov ecx, esi
call fcn.100028f0
jmp 0x10006b3a
mov ecx, dword [ebp - 0x208]
movzx eax, word [ebp - 0x18a]
mov dword [ecx], eax
mov ecx, dword [ebp - 0x218]
movzx eax, word [ebp - 0x144]
mov dword [ecx], eax
mov ecx, dword [ebp - 0x21c]
mov eax, dword [ebp - 0x184]
mov dword [ecx], eax
mov ecx, dword [ebp - 0x248]
mov eax, dword [ebp - 0x178]
mov dword [ecx], eax
mov ecx, dword [ebp - 0x244]
movzx eax, word [ebp - 0x188]
mov dword [ecx], eax
cmp eax, 0x10b
je 0x10006591
cmp eax, 0x20b
jne 0x100065b9
mov ecx, dword [ebp - 0x1f0]
mov eax, dword [ebp - 0xf8]
mov dword [ebp - 0x1fc], eax
mov eax, dword [ebp - 0xf4]
mov dword [ecx], eax
mov eax, dword [ebp - 0xa8]
jmp 0x100065b1
mov ecx, dword [ebp - 0x1f0]
mov eax, dword [ebp - 0x108]
mov dword [ebp - 0x1fc], eax
mov eax, dword [ebp - 0x104]
mov dword [ecx], eax
mov eax, dword [ebp - 0xb8]
mov ecx, dword [ebp - 0x204]
mov dword [ecx], eax
movzx ecx, word [ebp - 0x18c]
mov edx, dword [ebp - 0x5c]
add ecx, 0x18
add edx, ecx
mov ecx, edi
push esi
call fcn.10004c60
add esp, 4
cmp eax, 0xffffffff
je 0x10006b3a
mov eax, dword [ebp - 0x198]
mov ecx, 0x989680
imul ecx
lea ecx, [ebp - 0x27c]
mov dword [ebp - 0x208], 0
add eax, 0xd53e8000
mov dword [ebp - 0x38], eax
adc edx, 0x19db1de
mov dword [ebp - 0x34], edx
lea edx, [ebp - 0x38]
call fcn.10005a70
mov edi, eax
mov eax, dword [ebp - 0x200]
cmp eax, edi
je 0x10006699
mov edx, dword [eax + 0x14]
cmp edx, 8
jb 0x10006667
mov ecx, dword [eax]
lea edx, [edx*2 + 2]
cmp edx, 0x1000
jb 0x10006657
mov eax, dword [ecx - 4]
add edx, 0x23
sub ecx, eax
mov dword [ebp - 0x208], eax
lea eax, [ecx - 4]
cmp eax, 0x1f
ja 0x10006b68
mov ecx, dword [ebp - 0x208]
push edx
push ecx
call fcn.10015573
mov eax, dword [ebp - 0x200]
add esp, 8
mov dword [eax + 0x10], 0
xor ecx, ecx
mov dword [eax + 0x14], 7
mov word [eax], cx
movups xmm0, xmmword [edi]
movups xmmword [eax], xmm0
movq xmm0, qword [edi + 0x10]
movq qword [eax + 0x10], xmm0
xor eax, eax
mov dword [edi + 0x10], ecx
mov dword [edi + 0x14], 7
mov word [edi], ax
mov edx, dword [ebp - 0x268]
cmp edx, 8
jb 0x100066d9
mov ecx, dword [ebp - 0x27c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x100066cf
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10006b68
push edx
push ecx
call fcn.10015573
add esp, 8
mov edi, dword [ebp - 0x1ec]
mov ecx, edi
mov edx, dword [ebp - 0x19a]
push esi
push dword [ebp - 0x1f8]
call fcn.10005b40
add esp, 8
test eax, eax
je 0x10006b3a
mov eax, dword [ebp - 0x204]
mov edi, dword [eax]
test edi, edi
je 0x10006922
mov eax, dword [ebp - 0x1f8]
mov edx, dword [eax]
mov eax, dword [edx]
mov ecx, eax
cmp eax, edx
je 0x10006922
cmp edi, dword [ecx + 0x14]
jb 0x10006731
mov edx, dword [ecx + 0x10]
add edx, dword [ecx + 0x14]
cmp edi, edx
jb 0x1000674a
mov esi, dword [ebp - 0x1f8]
mov edx, dword [ecx]
mov ecx, edx
cmp edx, dword [esi]
mov esi, dword [ebp - 0x1f4]
jne 0x10006722
jmp 0x10006922
add ecx, 8
mov dword [ebp - 0x208], ecx
je 0x10006922
nop dword [eax]
mov edx, dword [eax + 0x14]
cmp edi, edx
jb 0x10006774
mov ecx, dword [eax + 0x10]
add ecx, edx
cmp edi, ecx
jb 0x100068c4
mov edx, dword [ebp - 0x1f8]
mov ecx, dword [eax]
mov eax, ecx
cmp ecx, dword [edx]
jne 0x10006760
xor eax, eax
mov edi, dword [ebp - 0x1ec]
mov edx, eax
push esi
mov ecx, edi
call fcn.10004c60
add esp, 4
cmp eax, 0xffffffff
je 0x10006922
push esi
push 0x48
lea edx, [ebp - 0x1e8]
mov ecx, edi
call fcn.10004ab0
add esp, 8
test eax, eax
jne 0x10006922
cmp dword [ebp - 0x1e8], 0x48
jne 0x10006922
mov eax, dword [ebp - 0x208]
mov ecx, edi
push esi
mov edx, dword [eax + 0x14]
sub edx, dword [eax + 0xc]
add edx, dword [ebp - 0x1e0]
call fcn.10004c60
add esp, 4
cmp eax, 0xffffffff
je 0x10006922
push esi
push 0x20
lea edx, [ebp - 0x58]
mov ecx, edi
call fcn.10004ab0
add esp, 8
test eax, eax
jne 0x10006922
cmp dword [ebp - 0x58], 0x424a5342
jne 0x10006922
push 0x10
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x24]
push 0x11
push eax
call fcn.10033864
add esp, 0x10
lea ecx, [ebp - 0x2e4]
call fcn.1000c9a0
mov edx, eax
lea ecx, [ebp - 0x24]
mov dword [ebp - 4], 2
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10006841
sub ecx, edi
lea eax, [ebp - 0x24]
add eax, ecx
mov ecx, edx
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x264]
push eax
call fcn.1000f0b0
mov edi, dword [ebp - 0x240]
lea eax, [ebp - 0x264]
cmp edi, eax
je 0x100068d0
mov ecx, dword [edi + 0x14]
cmp ecx, 8
jb 0x100068ab
mov eax, dword [edi]
lea ecx, [ecx*2 + 2]
cmp ecx, 0x1000
jb 0x100068a1
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10006b6d
mov eax, edx
push ecx
push eax
call fcn.10015573
add esp, 8
movups xmm0, xmmword [ebp - 0x264]
movups xmmword [edi], xmm0
movq xmm0, qword [ebp - 0x254]
movq qword [edi + 0x10], xmm0
jmp 0x10006910
mov eax, dword [eax + 0x1c]
sub eax, edx
add eax, edi
jmp 0x10006784
mov edx, dword [ebp - 0x250]
cmp edx, 8
jb 0x10006910
mov ecx, dword [ebp - 0x264]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10006906
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10006b6d
push edx
push ecx
call fcn.10015573
add esp, 8
lea ecx, [ebp - 0x2e4]
mov dword [ebp - 4], 0xffffffff
call fcn.1000c8e0
mov edx, dword [ebp - 0x1fc]
test edx, edx
je 0x10006941
mov ecx, dword [ebp - 0x1f0]
mov eax, dword [ebp - 0x30]
sub eax, dword [ecx]
mov ecx, dword [ebp - 0x23c]
sub eax, edx
mov dword [ecx], eax
mov eax, dword [ebp - 0x1f0]
mov eax, dword [eax]
cmp eax, 8
jbe 0x10006b34
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
jne 0x10006aa2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x294]
call fcn.10004820
push eax
mov edx, str.Error_LocalAlloc_failed
mov dword [ebp - 4], 3
lea ecx, [ebp - 0x264]
call fcn.10011040
mov edi, eax
add esp, 4
cmp esi, edi
je 0x10006a02
mov ecx, dword [esi + 0x14]
cmp ecx, 8
jb 0x100069d2
mov eax, dword [esi]
lea ecx, [ecx*2 + 2]
cmp ecx, 0x1000
jb 0x100069c8
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10006b72
mov eax, edx
push ecx
push eax
call fcn.10015573
add esp, 8
mov dword [esi + 0x10], 0
xor eax, eax
mov dword [esi + 0x14], 7
mov word [esi], ax
movups xmm0, xmmword [edi]
movups xmmword [esi], xmm0
movq xmm0, qword [edi + 0x10]
movq qword [esi + 0x10], xmm0
mov dword [edi + 0x10], eax
mov dword [edi + 0x14], 7
mov word [edi], ax
mov edx, dword [ebp - 0x250]
cmp edx, 8
jb 0x10006a42
mov ecx, dword [ebp - 0x264]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10006a38
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10006b72
push edx
push ecx
call fcn.10015573
add esp, 8
mov edx, dword [ebp - 0x280]
xor eax, eax
mov dword [ebp - 0x254], 0
mov dword [ebp - 0x250], 7
mov word [ebp - 0x264], ax
cmp edx, 8
jb 0x10006b34
mov ecx, dword [ebp - 0x294]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10006424
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10006b72
jmp 0x10006424
mov edx, dword [ebp - 0x1fc]
mov ecx, dword [ebp - 0x1ec]
push esi
call fcn.10004c60
add esp, 4
cmp eax, 0xffffffff
je 0x10006b2d
mov ecx, dword [ebp - 0x1ec]
mov edx, edi
push esi
mov esi, dword [ebp - 0x1f0]
push dword [esi]
call fcn.10004ab0
add esp, 8
test eax, eax
jne 0x10006b2d
mov ecx, dword [ebp - 0x238]
mov eax, dword [edi]
push dword [ebp - 0x220]
push dword [ebp - 0x224]
mov dword [ecx], eax
mov ecx, dword [ebp - 0x234]
movzx eax, word [edi + 4]
push dword [ebp - 0x228]
push dword [ebp - 0x22c]
mov word [ecx], ax
mov ecx, dword [ebp - 0x24c]
movzx eax, word [edi + 6]
mov word [ecx], ax
lea ecx, [edi + 8]
mov edx, dword [esi]
sub edx, 8
call fcn.10005cf0
mov ecx, dword [ebp - 0x230]
add esp, 0x10
mov dword [ecx], eax
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edi, dword [ebp - 0x1ec]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10015557
mov esp, ebp
pop ebp
ret
call fcn.1002f7e9
call fcn.1002f7e9
call fcn.1002f7e9
call fcn.1002f7e9
call fcn.1002f7e9
int3