Function at 0x403c00
Capabilities:
Access pe header
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov ebx, dword [sym.imp.ntdll.dll_RtlImageNtHeader]
push esi
mov esi, dword [ebp + 8]
push edi
test esi, esi
je 0x403f9c
push esi
call ebx
test eax, eax
je 0x403f9c
mov ecx, dword [esi + 0x3c]
movzx eax, word [ecx + esi + 6]
lea edi, [eax*4 + 0x1f]
add edi, eax
lea edi, [ecx + edi*8]
add edi, esi
cmp dword [edi], 0x11ffee00
jne 0x403f9c
cmp dword [edi + 4], 0xaabbcc
jne 0x403f9c
cmp dword [edi + 0x10], esi
jne 0x403f9c
push esi
call ebx
mov dword [ebp - 8], eax
test edi, edi
je 0x403f9f
mov dl, byte [edi + 0xc]
test dl, 2
je 0x403f9f
movzx eax, word [edi + 0xe]
test al, 1
jne 0x403d21
or dl, 4
push esi
mov byte [edi + 0xc], dl
call ebx
test eax, eax
je 0x403d07
mov ecx, dword [esi + 0x3c]
movzx eax, word [ecx + esi + 6]
lea edi, [eax*4 + 0x1f]
add edi, eax
lea edi, [ecx + edi*8]
add edi, esi
cmp dword [edi], 0x11ffee00
jne 0x403d07
cmp dword [edi + 4], 0xaabbcc
jne 0x403d07
cmp dword [edi + 0x10], esi
jne 0x403d07
push esi
call ebx
test edi, edi
je 0x403d0a
mov al, byte [edi + 0xc]
and al, 6
cmp al, 2
je 0x403d0a
cmp dword [edi + 0x18], 0
je 0x403cd9
mov ecx, edi
call fcn.00407150
cmp dword [edi + 0x10], 0
je 0x403ced
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov ecx, 1
xor edx, edx
pop edi
test ecx, ecx
mov eax, 0xc0000001
pop esi
cmovne eax, edx
pop ebx
mov esp, ebp
pop ebp
ret 4
push esi
call ebx
xor ecx, ecx
xor edx, edx
pop edi
test ecx, ecx
mov eax, 0xc0000001
pop esi
cmovne eax, edx
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [edi + 0x2c]
mov eax, dword [ebp - 8]
mov dword [ebp - 0xc], ecx
mov eax, dword [eax + 0x50]
cmp eax, dword [ecx + 0x20]
je 0x403d3c
mov ecx, 7
int 0x29
mov ecx, dword [ebp - 0xc]
movzx eax, word [edi + 0xe]
test al, 8
je 0x403d85
test dword [edi + 0x20], 0xfffffffe
je 0x403d85
mov eax, dword [edi + 0x20]
cmp eax, 0xffffffff
je 0x403d7a
mov edx, 0xffff
cmp word [ecx + 0x38], dx
jne 0x403d72
mov dword [edi + 0x20], 0xffffffff
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
test eax, eax
je 0x403d7a
dec eax
mov dword [edi + 0x20], eax
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 4
or dl, 4
mov byte [edi + 0xc], dl
test dl, 1
je 0x403da2
mov eax, dword [ebp - 8]
mov ecx, dword [edi + 0x10]
push 0
push 0
mov eax, dword [eax + 0x28]
push ecx
add eax, ecx
call eax
movzx eax, word [edi + 0xe]
mov dword [ebp - 4], 0
test al, 1
je 0x403f16
mov dword [ebp - 4], 0
test al, 2
je 0x403dd7
mov ecx, esi
call fcn.00405720
mov edx, eax
mov dword [ebp - 4], edx
test edx, edx
jns 0x403dd7
mov ecx, 3
int 0x29
test byte [edi + 0xe], 4
mov edi, dword [ebp - 0xc]
je 0x403dfe
mov eax, dword [0x438ce4]
push edi
mov eax, dword [eax + 0x54]
mov eax, dword [eax + 0x10]
call eax
mov edx, eax
mov dword [ebp - 4], edx
test edx, edx
jns 0x403dfe
mov ecx, 7
int 0x29
mov eax, dword fs:[0x18]
mov ecx, dword [0x438ce4]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [ebp - 8], eax
movzx eax, byte [ecx + 0x14]
dec eax
cmp eax, 8
ja case.default.0x403e28
movzx eax, byte [eax + 0x403fbc]
jmp dword [eax*4 + 0x403fb0]
mov ecx, edi
call fcn.00404540
push dword [edi + 0x50]
push 0
push dword [ebp - 8]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov ecx, dword [0x438ce4]
mov edx, dword [ecx + 0x3c]
mov eax, dword [edx + 0xc]
mov dword [ebp - 0x10], eax
test eax, eax
je case.0x403e28.2
lea eax, [edi + 0x68]
push eax
push dword [edx]
call dword [ebp - 0x10]
mov ecx, dword [0x438ce4]
movzx eax, word [ecx + 0x16]
cmp eax, 0x68
je 0x403e79
mov ecx, 0x80
cmp ax, cx
jne case.0x403e28.1
lea eax, [edi + 0x50]
mov edi, dword [eax]
mov dword [ebp - 0x10], eax
cmp eax, edi
je case.0x403e28.1
mov esi, dword [ebp - 8]
mov ebx, eax
nop word [eax + eax]
mov eax, dword [edi + 8]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_LdrUnloadDll]
mov edi, dword [edi]
push dword [edi + 4]
push 0
push esi
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
cmp ebx, edi
jne 0x403e90
mov esi, dword [ebp + 8]
mov ebx, dword [sym.imp.ntdll.dll_RtlImageNtHeader]
mov edi, dword [ebp - 0xc]
push dword [edi + 0x30]
push 0
push dword [ebp - 8]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
push dword [edi + 0x28]
push 0
push dword [ebp - 8]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov eax, dword [edi + 4]
mov ecx, dword [edi]
push edi
push 0
mov dword [eax], ecx
push dword [ebp - 8]
mov dword [ecx + 4], eax
mov eax, dword [edi + 0xc]
mov ecx, dword [edi + 8]
mov dword [eax], ecx
mov dword [ecx + 4], eax
mov eax, dword [edi + 0x14]
mov ecx, dword [edi + 0x10]
mov dword [eax], ecx
mov dword [ecx + 4], eax
mov eax, dword [edi + 0x40]
mov ecx, dword [edi + 0x3c]
mov dword [eax], ecx
mov dword [ecx + 4], eax
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
jmp 0x403f16
mov ecx, 7
int 0x29
push esi
call ebx
test eax, eax
je 0x403f86
mov ecx, dword [esi + 0x3c]
movzx eax, word [ecx + esi + 6]
lea edi, [eax*4 + 0x1f]
add edi, eax
lea edi, [ecx + edi*8]
add edi, esi
cmp dword [edi], 0x11ffee00
jne 0x403f86
cmp dword [edi + 4], 0xaabbcc
jne 0x403f86
cmp dword [edi + 0x10], esi
jne 0x403f86
push esi
call ebx
test edi, edi
je 0x403f89
mov al, byte [edi + 0xc]
and al, 6
cmp al, 2
je 0x403f89
cmp dword [edi + 0x18], 0
je 0x403f66
mov ecx, edi
call fcn.00407150
cmp dword [edi + 0x10], 0
je 0x403f90
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push esi
call ebx
mov ecx, 7
int 0x29
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push esi
call ebx
pop edi
pop esi
mov eax, 0xc0000008
pop ebx
mov esp, ebp
pop ebp
ret 4