Function at 0x402bb0
Capabilities:
Check if file exists
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x164
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x160], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, edx
mov dword [esp + 0x20], eax
push edi
mov dword [esp + 0x10], ebx
mov edi, ecx
mov eax, dword [esi]
and eax, 4
mov dword [esp + 0x18], esi
or eax, 0
jne 0x4030e6
cmp dword [edi + 0xc], eax
je 0x402c93
lea eax, [esp + 0x28]
push eax
push ebx
push 2
call dword [sym.imp.KERNEL32.dll_GetModuleHandleExA]
test eax, eax
je 0x402c79
push 0x104
lea eax, [esp + 0x64]
push eax
push dword [esp + 0x30]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x402c79
cmp dword [esi + 0x10], 0
jne 0x402c3a
lea eax, [esp + 0x60]
push eax
call fcn.0040646b
add esp, 4
mov dword [esi + 0x10], eax
mov ecx, dword [esp + 0x28]
mov edx, dword [ecx + 0x3c]
add edx, ecx
mov dword [esp + 0x38], edx
mov eax, dword [ecx + 0x3c]
add eax, 0xf8
add eax, ecx
mov dword [esp + 0x44], eax
movzx eax, word [edx + 6]
mov dword [esp + 0x34], ecx
mov ecx, dword [edi + 0x1c]
mov dword [esp + 0x40], eax
cmp ecx, 0xffffffff
je 0x402de3
movzx eax, word [edx + 4]
cmp eax, ecx
je 0x402de3
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x160]
xor ecx, esp
call fcn.004030fd
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x20]
xor ebx, ebx
mov edx, dword [sym.imp.imagehlp.dll_MapAndLoad]
xor esi, esi
cmp dword [eax], ebx
jbe 0x402d3b
test esi, esi
jne 0x402dca
mov ecx, dword [edi + 0x1c]
mov eax, dword [eax + 4]
push 1
push esi
mov dword [esp + 0x1c], ecx
lea ecx, [esp + 0x34]
mov eax, dword [eax + ebx*4]
push ecx
push eax
push dword [esp + 0x20]
mov dword [esp + 0x20], eax
call edx
mov esi, eax
test esi, esi
jne 0x402cff
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x402d21
push 1
push 1
lea eax, [esp + 0x34]
push eax
push dword [esp + 0x18]
mov eax, dword [sym.imp.imagehlp.dll_MapAndLoad]
push dword [esp + 0x20]
call eax
mov esi, eax
test esi, esi
je 0x402d21
mov ecx, dword [esp + 0x14]
cmp ecx, 0xffffffff
je 0x402d21
mov eax, dword [esp + 0x38]
movzx eax, word [eax + 4]
cmp eax, ecx
je 0x402d21
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.imagehlp.dll_UnMapAndLoad]
xor esi, esi
mov eax, dword [edi + 0x20]
inc ebx
mov edx, dword [sym.imp.imagehlp.dll_MapAndLoad]
cmp ebx, dword [eax]
jb 0x402ca8
test esi, esi
jne 0x402dca
mov eax, dword [edi + 0x1c]
mov ebx, dword [esp + 0x10]
push 1
push 0
mov dword [esp + 0x14], eax
lea eax, [esp + 0x34]
push eax
push 0
push ebx
call edx
mov esi, eax
test esi, esi
jne 0x402d7d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x402d9f
push 1
push 1
lea eax, [esp + 0x34]
push eax
mov eax, dword [sym.imp.imagehlp.dll_MapAndLoad]
push esi
push ebx
call eax
mov esi, eax
test esi, esi
je 0x402da3
mov ecx, dword [esp + 0xc]
cmp ecx, 0xffffffff
je 0x402d9f
mov eax, dword [esp + 0x38]
movzx eax, word [eax + 4]
cmp eax, ecx
je 0x402d9f
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.imagehlp.dll_UnMapAndLoad]
jmp 0x402da3
test esi, esi
jne 0x402dca
mov edx, dword [esp + 0x18]
mov eax, dword [edx + 4]
or dword [edx], 2
mov dword [edx + 4], eax
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x160]
xor ecx, esp
call fcn.004030fd
mov esp, ebp
pop ebp
ret
mov esi, dword [esp + 0x18]
cmp dword [esi + 0x10], 0
jne 0x402de3
push dword [esp + 0x2c]
call fcn.0040646b
add esp, 4
mov dword [esi + 0x10], eax
cmp dword [edi + 0x1c], 0xffffffff
jne 0x402df4
mov eax, dword [esp + 0x38]
movzx eax, word [eax + 4]
mov dword [edi + 0x1c], eax
mov eax, dword [edi + 0x18]
mov esi, dword [edi + 0x14]
mov ecx, dword [edi + 0x10]
mov dword [esp + 0x14], eax
mov ebx, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x20], esi
mov dword [esp + 0xc], ecx
cmp dword [esi + 4], eax
jb 0x402e78
ja 0x402e19
cmp dword [esi], ebx
jb 0x402e78
test eax, eax
jne 0x402e2a
test ebx, ebx
jne 0x402e2a
lea ebx, [eax + 0x40]
mov dword [esp + 0x1c], eax
jmp 0x402e34
shld eax, ebx, 1
mov dword [esp + 0x1c], eax
add ebx, ebx
lea eax, [ebx*4]
push eax
push dword [ecx]
call fcn.00406460
mov edx, dword [esp + 0x1c]
mov ecx, ebx
mov esi, eax
mov edx, dword [edx]
sub ecx, edx
shl ecx, 2
push ecx
push 0
lea ecx, [esi + edx*4]
push ecx
call fcn.004043c0
mov eax, dword [esp + 0x20]
add esp, 0x14
mov ecx, dword [esp + 0x14]
mov dword [eax], esi
mov eax, dword [esp + 0x1c]
mov esi, dword [esp + 0x20]
mov dword [ecx], ebx
mov dword [ecx + 4], eax
push dword [esp + 0x10]
call fcn.0040646b
mov edx, dword [esi]
add esp, 4
mov ecx, dword [esp + 0xc]
mov ecx, dword [ecx]
mov dword [ecx + edx*4], eax
add dword [esi], 1
mov ecx, dword [esp + 0x18]
adc dword [esi + 4], 0
mov eax, dword [esp + 0x34]
or dword [ecx], 4
mov dword [ecx + 0x14], eax
mov eax, dword [ecx + 4]
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0x20], eax
lea eax, [eax + eax*2]
add eax, 3
shl eax, 2
push eax
call fcn.00408540
mov ecx, dword [esp + 0x44]
add esp, 4
mov edx, eax
xor ebx, ebx
mov dword [esp + 0xc], edx
test ecx, ecx
je 0x402f37
xor esi, esi
add edx, 8
nop dword [eax]
mov eax, dword [esp + 0x44]
mov ecx, dword [esi + eax + 0xc]
mov dword [edx - 8], ecx
mov eax, dword [esp + 0x44]
mov eax, dword [esi + eax + 8]
add eax, ecx
mov dword [edx - 4], eax
cmp dword [edi + 0xc], 0
je 0x402f06
mov eax, dword [esp + 0x34]
mov dword [edx], eax
jmp 0x402f24
mov ecx, dword [esp + 0x44]
mov eax, dword [ecx + esi + 0x14]
test eax, eax
je 0x402f1e
sub eax, dword [ecx + esi + 0xc]
add eax, dword [esp + 0x34]
mov dword [edx], eax
jmp 0x402f24
mov dword [edx], 0
mov ecx, dword [esp + 0x40]
inc ebx
add edx, 0xc
add esi, 0x28
cmp ebx, ecx
jb 0x402ee0
mov edx, dword [esp + 0xc]
push dword [esp + 0x20]
lea eax, [ecx + ecx*2]
mov dword [edx + eax*4], 0
lea ecx, [esp + 0x30]
mov eax, dword [esp + 0x44]
push edx
lea eax, [eax + eax*2]
mov dword [edx + eax*4 + 4], 0
mov eax, dword [esp + 0x48]
lea eax, [eax + eax*2]
mov dword [edx + eax*4 + 8], 0
mov edx, dword [esp + 0x20]
push edx
push dword [esp + 0x30]
mov edx, edi
call fcn.00402090
push dword [esp + 0x1c]
call fcn.00408690
add esp, 0x14
cmp dword [edi + 0xc], 0
jne 0x402f95
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.imagehlp.dll_UnMapAndLoad]
mov eax, dword [esp + 0x18]
xor edx, edx
mov dword [esp + 0x14], edx
cmp dword [eax + 0x34], edx
jb 0x4030e6
ja 0x402fb3
cmp dword [eax + 0x30], edx
jbe 0x4030e6
xor ecx, ecx
mov dword [esp + 0x1c], ecx
nop dword [eax]
add ecx, dword [eax + 0x40]
mov dword [esp + 0xc], ecx
cmp dword [ecx + 0x1c], 0
jne 0x4030b9
mov eax, dword [ecx + 0x18]
mov dword [esp + 0x10], eax
test eax, eax
je 0x4030b9
mov edx, dword [ecx + 0x10]
mov dword [esp + 0x24], edx
test edx, edx
jne 0x402ff4
cmp dword [ecx + 0x14], edx
jle 0x4030b9
mov edi, dword [eax + 0x4c]
xor ebx, ebx
mov esi, dword [eax + 0x48]
mov dword [esp + 0x5c], esi
mov dword [esp + 0x20], edi
test edi, edi
jb 0x4030b9
ja 0x403016
test esi, esi
je 0x4030b9
xor edi, edi
test edx, edx
je 0x403065
mov esi, dword [eax + 0x50]
mov eax, dword [edi + esi + 4]
test eax, eax
je 0x403061
mov ecx, edx
nop dword [eax]
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x403050
test dl, dl
je 0x40304c
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x403050
add ecx, 2
add eax, 2
test dl, dl
jne 0x403030
xor eax, eax
jmp 0x403055
sbb eax, eax
or eax, 1
test eax, eax
je 0x40309e
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x10]
mov ecx, dword [ecx + 0x14]
test ecx, ecx
jle 0x40307d
mov esi, dword [eax + 0x50]
movzx eax, word [edi + esi + 8]
test ax, ax
je 0x40307d
cmp ecx, eax
je 0x40309e
xor eax, eax
inc ebx
add edi, 0x1c
cmp eax, dword [esp + 0x20]
ja 0x4030b9
jb 0x403091
cmp ebx, dword [esp + 0x5c]
jae 0x4030b9
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
jmp 0x403018
mov edx, dword [esp + 0x18]
lea eax, [ebx*8]
sub eax, ebx
lea ecx, [esi + eax*4]
mov eax, dword [edx + 0x40]
mov edx, dword [esp + 0x1c]
mov dword [eax + edx + 0x1c], ecx
mov eax, dword [esp + 0x18]
xor edx, edx
mov ecx, dword [esp + 0x1c]
inc dword [esp + 0x14]
add ecx, 0x20
mov dword [esp + 0x1c], ecx
cmp edx, dword [eax + 0x34]
jb 0x402fc0
ja 0x4030e6
mov edx, dword [esp + 0x14]
cmp edx, dword [eax + 0x30]
jb 0x402fc0
mov ecx, dword [esp + 0x16c]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004030fd
mov esp, ebp
pop ebp
ret