Function at 0x403090
Capabilities:
Enumerate pe sections

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x407004]
xor eax, ebp
mov dword [ebp - 4], eax
test dword [0x4011a8], 0x1000
push ebx
push esi
push edi
je 0x403190
push 0x4074f0
call dword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
mov eax, dword [0x40740c]
inc eax
mov dword [0x40740c], eax
cmp eax, 1
jne 0x403185
mov eax, dword [0x40003c]
cmp dword [eax + 0x400074], 0xd
lea ecx, [eax + 0x400000]
jbe 0x4041eb
mov esi, dword [ecx + 0xe0]
test esi, esi
je 0x4041eb
movzx eax, word [ecx + 0x14]
xor edi, edi
movzx ebx, word [ecx + 6]
add eax, 0x18
mov esi, dword [esi + 0x40000c]
add eax, ecx
test ebx, ebx
je 0x4041eb
mov edx, dword [eax + 0xc]
cmp esi, edx
jb 0x403127
mov ecx, dword [eax + 8]
add ecx, edx
cmp esi, ecx
jb 0x403134
inc edi
add eax, 0x28
cmp edi, ebx
jb 0x403117
jmp 0x4041eb
mov edi, dword [eax + 8]
mov esi, edx
add esi, 0x400000
je 0x4041eb
cmp dword [0x407408], 0
jne 0x40316e
test dword [eax + 0x24], 0x80000000
mov dword [0x407408], 1
je 0x4041d3
mov edx, edi
mov ecx, esi
call fcn.004033f0
push 0x407410
push 4
push edi
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x4041df
push 0x4074f0
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x3c], 0x24
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x2c], 0
mov edi, dword [ebx + 0x14]
mov eax, dword [ebx + 4]
add edi, 0x400000
mov esi, dword [ebx + 8]
add eax, 0x400000
mov ecx, dword [ebx + 0xc]
add esi, 0x400000
mov edx, dword [ebx + 0x10]
add ecx, 0x400000
mov dword [ebp - 0x10], edi
add edx, 0x400000
test dword [ebx], 1
mov edi, dword [ebx + 0x1c]
mov dword [ebp - 0x18], edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
je 0x4041fa
mov eax, dword [ebp + 0xc]
mov edi, dword [esi]
sub eax, ecx
sar eax, 2
lea ecx, [eax*4]
mov eax, dword [ecx + edx]
mov dword [ebp - 8], ecx
test eax, eax
js 0x4033d1
mov dword [ebp - 0x2c], 1
lea eax, [eax + 0x400002]
mov esi, dword [0x401ba8]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0xc], 0
test esi, esi
jne 0x40421f
test edi, edi
jne 0x4032a0
mov esi, dword [0x401ba8]
test esi, esi
jne 0x404242
push 0
push 0
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov edi, eax
test edi, edi
je 0x404261
mov edx, dword [ebp - 0x14]
mov ecx, edi
xor eax, eax
lock cmpxchg dword [edx], ecx
mov esi, eax
test esi, esi
jne 0x4042c0
cmp edi, 0xffffffff
je 0x40329d
cmp dword [ebx + 0x18], eax
jne 0x4042b4
mov ecx, dword [ebp - 8]
mov esi, dword [0x401ba8]
mov dword [ebp - 0x24], edi
test esi, esi
jne 0x4042de
mov eax, dword [ebp - 0xc]
test eax, eax
jne 0x4032db
cmp dword [ebx + 0x14], eax
je 0x4032c6
cmp dword [ebx + 0x1c], eax
jne 0x4042f9
push dword [ebp - 0x28]
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0xc], eax
test eax, eax
je 0x404336
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
mov esi, dword [0x401ba8]
test esi, esi
jne 0x404392
mov edi, dword [ebp - 0xc]
test dword [0x4011a8], 0x1000
je 0x4033bc
push 0x4074f0
call dword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
sub dword [0x40740c], 1
jne 0x4033b1
mov eax, dword [0x407410]
mov dword [ebp - 0x18], eax
mov eax, dword [0x40003c]
cmp dword [eax + 0x400074], 0xd
lea edx, [eax + 0x400000]
jbe 0x40337b
mov esi, dword [edx + 0xe0]
test esi, esi
je 0x40337b
movzx eax, word [edx + 0x14]
lea ecx, [edx + 0x18]
mov esi, dword [esi + 0x40000c]
add ecx, eax
movzx eax, word [edx + 6]
xor ebx, ebx
mov dword [ebp - 0x10], eax
test eax, eax
je 0x40337b
jmp 0x403360
mov edx, dword [ecx + 0xc]
cmp esi, edx
jb 0x403373
mov eax, dword [ecx + 8]
add eax, edx
cmp esi, eax
jb 0x403384
mov eax, dword [ebp - 0x10]
inc ebx
add ecx, 0x28
cmp ebx, eax
jb 0x403360
mov dword [ebp - 0x14], 4
jmp 0x4033b1
mov ebx, dword [ecx + 8]
mov esi, edx
add esi, 0x400000
je 0x40337b
cmp dword [0x407408], 0
je 0x4043b7
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x18]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x4033e0
push 0x4074f0
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00403a60
mov esp, ebp
pop ebp
ret 8
mov dword [ebp - 0x2c], 0
movzx eax, ax
jmp 0x403239
mov ecx, 0x19
int 0x29
jmp 0x4033b1
mov ecx, 0x19
int 0x29
jmp 0x403165
mov ecx, 0x19
int 0x29
jmp 0x403185
mov dword [0x407410], 4
jmp 0x403185
lea eax, [ebp - 0x3c]
mov dword [ebp - 8], eax
call fcn.004060e9
lea eax, [ebp - 8]
push eax
push 1
push 0
push 0xc06d0057
call dword [sym.imp.KERNEL32.dll_RaiseException]
lea eax, [ebp - 0x3c]
mov ecx, esi
push eax
push 0
call dword [0x408190]
call esi
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x4032e0
mov ecx, dword [ebp - 8]
jmp 0x403251
lea eax, [ebp - 0x3c]
mov ecx, esi
push eax
push 1
call dword [0x408190]
call esi
mov edi, eax
test edi, edi
jne 0x40327a
jmp 0x403263
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [0x401a64]
mov dword [ebp - 0x1c], eax
test esi, esi
je 0x40428e
lea eax, [ebp - 0x3c]
mov ecx, esi
push eax
push 3
call dword [0x408190]
call esi
mov edi, eax
test edi, edi
jne 0x40327a
lea eax, [ebp - 0x3c]
mov dword [ebp - 8], eax
call fcn.004060e9
lea eax, [ebp - 8]
push eax
push 1
push 0
push 0xc06d007e
call dword [sym.imp.KERNEL32.dll_RaiseException]
mov ecx, ebx
call fcn.00406131
jmp 0x40329d
cmp edi, 0xffffffff
je 0x4042cc
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [ebp - 8]
cmp edi, esi
je 0x4032a0
mov edi, esi
jmp 0x4032a0
lea eax, [ebp - 0x3c]
mov ecx, esi
push eax
push 2
call dword [0x408190]
call esi
mov ecx, dword [ebp - 8]
mov dword [ebp - 0xc], eax
jmp 0x4032b4
mov eax, dword [edi + 0x3c]
cmp dword [eax + edi], 0x4550
jne 0x4032c6
mov edx, dword [ebp - 0x18]
cmp dword [eax + edi + 8], edx
jne 0x4032c6
cmp edi, dword [eax + edi + 0x34]
jne 0x4032c6
mov eax, dword [ebp - 0x10]
mov eax, dword [ecx + eax]
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x4032db
jmp 0x4032c6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [0x401a64]
mov dword [ebp - 0x1c], eax
test esi, esi
je 0x404364
lea eax, [ebp - 0x3c]
mov ecx, esi
push eax
push 4
call dword [0x408190]
call esi
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x4032db
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x10], eax
call fcn.004060e9
lea eax, [ebp - 0x10]
push eax
push 1
push 0
push 0xc06d007f
call dword [sym.imp.KERNEL32.dll_RaiseException]
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x24], edi
mov edi, dword [ebp - 0xc]
mov ecx, esi
push eax
push 5
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], edi
call dword [0x408190]
call esi
jmp 0x4032f1
test dword [ecx + 0x24], 0x80000000
mov dword [0x407408], 1
jne 0x4043d1
mov ecx, 0x19
int 0x29
mov edx, ebx
mov ecx, esi
call fcn.004033f0
jmp 0x40339e