Function at 0x401070
Capabilities:
Enumerate pe sections
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x40a004]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x3c]
movzx edx, word [eax + ecx + 0x14]
add eax, ecx
mov ecx, dword [eax + 0x28]
mov dword [ebp - 0x28], ecx
movzx ecx, word [eax + 6]
push ebx
push esi
mov dword [ebp - 0x10], eax
lea ebx, [edx + eax + 0x18]
mov eax, ecx
xor esi, esi
push edi
test eax, eax
je 0x4010be
lea edx, [ebx + 0x24]
lea esp, [esp]
dec eax
test byte [edx], 0x20
je 0x4010b7
inc esi
add edx, 0x28
test eax, eax
jne 0x4010b0
mov eax, 1
cmp eax, esi
sbb eax, eax
neg eax
xor edi, edi
mov dword [ebp - 0x24], eax
mov dword [ebp - 8], edi
mov dword [ebp - 0xc], ecx
test ecx, ecx
je 0x40116f
add ebx, 0x10
nop
dec dword [ebp - 0xc]
cmp byte [ebx - 9], 1
jne 0x40115f
mov eax, 0xc
call fcn.00405e20
mov ecx, dword [ebx - 4]
mov esi, esp
mov dword [esi], ecx
mov eax, dword [ebx - 8]
mov dword [esi + 4], eax
mov ecx, dword [ebx]
cmp eax, ecx
jbe 0x401109
mov dword [esi + 4], ecx
cmp dword [ebp - 0x24], 0
je 0x401121
mov eax, dword [ebx - 4]
mov ecx, dword [ebp - 0x28]
cmp ecx, eax
jb 0x401121
mov edx, dword [ebx]
add edx, eax
cmp ecx, edx
jb 0x40115f
mov edx, dword [esi]
mov ecx, dword [esi + 4]
add edx, dword [ebp + 8]
lea eax, [ebp - 0x1c]
push eax
push 4
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
xor ecx, ecx
mov eax, edi
test edi, edi
je 0x401152
mov edx, dword [esi]
cmp dword [eax], edx
ja 0x40114e
mov ecx, eax
mov eax, dword [eax + 8]
test eax, eax
jne 0x401141
test ecx, ecx
jne 0x401159
mov dword [esi + 8], eax
mov edi, esi
jmp 0x40115f
mov dword [esi + 8], eax
mov dword [ecx + 8], esi
add ebx, 0x28
cmp dword [ebp - 0xc], 0
ja 0x4010e0
mov dword [ebp - 8], edi
mov eax, 0xc
call fcn.00405e20
mov ebx, dword [ebp - 0x10]
xor edi, edi
mov esi, esp
add ebx, 0x78
cmp edi, 4
je 0x4011ba
mov eax, dword [ebx]
test eax, eax
je 0x4011ba
cmp dword [ebx + 4], 0
je 0x4011ba
lea ecx, [ebp - 8]
mov dword [esi], eax
mov eax, dword [ebx + 4]
push ecx
mov ecx, esi
mov dword [esi + 4], eax
call fcn.004018f0
add esp, 4
test eax, eax
je 0x4011ba
mov eax, 0xc
call fcn.00405e20
mov esi, esp
inc edi
add ebx, 8
cmp edi, 0x10
jb 0x401183
mov ecx, dword [ebp - 0x10]
mov ebx, dword [ecx + 0x80]
add ebx, dword [ebp + 8]
mov eax, 0xcccccccd
mul dword [ecx + 0x84]
shr edx, 4
mov dword [ebp - 0xc], edx
test edx, edx
je 0x4012ef
jmp 0x4011f0
cmp dword [ebx], 0
je 0x4012e3
mov eax, dword [ebx + 0xc]
mov edi, dword [ebp + 8]
lea ecx, [eax + edi]
push ecx
mov dword [esi], eax
call fcn.004019e0
lea edx, [ebp - 8]
inc eax
push edx
mov ecx, esi
mov dword [esi + 4], eax
call fcn.004018f0
add esp, 8
test eax, eax
je 0x40122c
mov eax, 0xc
call fcn.00405e20
mov esi, esp
mov edx, dword [ebx]
cmp dword [edx + edi], 0
lea eax, [edx + edi]
mov ecx, 1
je 0x401249
lea esp, [esp]
add eax, 4
inc ecx
cmp dword [eax], 0
jne 0x401240
lea edi, [ecx*4]
lea eax, [ebp - 8]
push eax
mov ecx, esi
mov dword [esi], edx
mov dword [esi + 4], edi
call fcn.004018f0
add esp, 4
test eax, eax
je 0x401273
mov eax, 0xc
call fcn.00405e20
mov esi, esp
mov ecx, dword [ebx + 0x10]
lea edx, [ebp - 8]
mov dword [esi], ecx
push edx
mov ecx, esi
mov dword [esi + 4], edi
call fcn.004018f0
add esp, 4
test eax, eax
je 0x401299
mov eax, 0xc
call fcn.00405e20
mov esi, esp
mov edi, dword [ebx]
add edi, dword [ebp + 8]
mov eax, dword [edi]
test eax, eax
je 0x4012e3
js 0x4012d9
mov ecx, dword [ebp + 8]
lea edx, [eax + ecx + 2]
push edx
mov dword [esi], eax
call fcn.004019e0
add eax, 3
mov dword [esi + 4], eax
lea eax, [ebp - 8]
push eax
mov ecx, esi
call fcn.004018f0
add esp, 8
test eax, eax
je 0x4012d9
mov eax, 0xc
call fcn.00405e20
mov esi, esp
mov eax, dword [edi + 4]
add edi, 4
test eax, eax
jne 0x4012a4
add ebx, 0x14
dec dword [ebp - 0xc]
jne 0x4011f0
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x10]
mov ebx, dword [ebp - 8]
mov eax, ecx
sub eax, dword [ebp + 0xc]
mov dword [ebp - 0x14], eax
mov eax, dword [edx + 0xa0]
test eax, eax
je 0x401397
cmp dword [ebp - 0x14], 0
je 0x401397
mov edx, dword [edx + 0xa4]
add ecx, eax
test edx, edx
je 0x401397
mov esi, dword [ecx]
mov eax, dword [ecx + 4]
mov dword [ebp - 0x18], esi
lea edi, [ecx + 8]
add ecx, eax
sub edx, eax
lea esi, [eax - 8]
shr esi, 1
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0xc], edx
je 0x401393
movzx eax, word [edi]
mov ecx, eax
and ecx, 0xfffff000
dec esi
cmp ecx, 0x3000
jne 0x401383
and eax, 0xfff
add eax, dword [ebp - 0x18]
mov ecx, ebx
test ebx, ebx
je 0x401383
mov edx, dword [ecx]
cmp eax, edx
jb 0x401371
mov ebx, dword [ecx + 4]
add ebx, edx
cmp eax, ebx
jb 0x40137a
mov ecx, dword [ecx + 8]
test ecx, ecx
jne 0x401362
jmp 0x401383
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x14]
sub dword [eax + ecx], edx
mov ebx, dword [ebp - 8]
add edi, 2
test esi, esi
jne 0x401340
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0xc]
test edx, edx
jne 0x401324
mov esi, ebx
test ebx, ebx
je 0x4013b3
mov edi, dword [ebp + 8]
mov edx, dword [esi]
mov eax, dword [esi + 4]
add edx, edi
call fcn.00401510
mov esi, dword [esi + 8]
test esi, esi
jne 0x4013a0
mov edi, dword [ebp - 0x10]
mov eax, dword [edi + 0xa0]
test eax, eax
je 0x40145a
cmp dword [ebp - 0x14], 0
je 0x40145a
mov ecx, dword [ebp + 8]
mov edx, dword [edi + 0xa4]
add ecx, eax
test edx, edx
je 0x40145a
mov esi, dword [ecx]
mov eax, dword [ecx + 4]
mov dword [ebp - 0x18], esi
lea edi, [ecx + 8]
add ecx, eax
sub edx, eax
lea esi, [eax - 8]
shr esi, 1
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0xc], edx
je 0x401453
lea ecx, [ecx]
movzx eax, word [edi]
mov edx, eax
and edx, 0xfffff000
dec esi
cmp edx, 0x3000
jne 0x401443
and eax, 0xfff
add eax, dword [ebp - 0x18]
mov ecx, ebx
test ebx, ebx
je 0x401443
mov edx, dword [ecx]
cmp eax, edx
jb 0x401431
mov ebx, dword [ecx + 4]
add ebx, edx
cmp eax, ebx
jb 0x40143a
mov ecx, dword [ecx + 8]
test ecx, ecx
jne 0x401422
jmp 0x401443
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp + 8]
add dword [eax + ecx], edx
mov ebx, dword [ebp - 8]
add edi, 2
test esi, esi
jne 0x401400
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x20]
test edx, edx
jne 0x4013e1
mov edi, dword [ebp - 0x10]
movzx ebx, word [edi + 6]
movzx eax, word [edi + 0x14]
lea esi, [eax + edi + 0x24]
test ebx, ebx
je 0x4014ed
mov edi, edi
dec ebx
cmp byte [esi - 5], 1
jne 0x4014e6
cmp dword [ebp - 0x24], 0
je 0x401493
mov eax, dword [esi]
mov ecx, dword [ebp - 0x28]
cmp ecx, eax
jb 0x401493
mov edx, dword [esi + 4]
add edx, eax
cmp ecx, edx
jb 0x4014e6
mov eax, dword [esi + 0x18]
test eax, 0x20000000
je 0x4014a4
mov eax, 0x10
jmp 0x4014b3
and eax, 0x80000000
neg eax
sbb eax, eax
and eax, 2
add eax, 2
lea ecx, [ebp - 0x1c]
push ecx
mov dword [ebp - 0x1c], eax
mov edi, dword [esi]
mov edx, dword [esi - 4]
add edi, dword [ebp + 8]
push eax
push edx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test dword [esi + 0x18], 0x20000000
je 0x4014e6
mov eax, dword [esi - 4]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
add esi, 0x28
test ebx, ebx
jne 0x401470
lea esp, [ebp - 0x34]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401a77
mov esp, ebp
pop ebp
ret