Function at 0x408160
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a8
mov eax, dword [ebp + 0xc]
push ebx
xor ebx, ebx
cmp eax, ebx
push esi
push edi
je 0x40817c
mov eax, dword [eax]
mov dword [ebp - 0x14], eax
jmp 0x408183
mov dword [ebp - 0x14], 0x4c6a64
push 0x105
lea ecx, [ebp - 8]
call fcn.004465ac
mov esi, dword [ebp + 0x10]
cmp esi, ebx
mov ecx, dword [ebp - 8]
mov dword [ebp - 0xc], ecx
je 0x4081a1
cmp dword [esi], ebx
jne 0x4081b4
push 0x104
push ecx
push ebx
mov dword [ebp - 0xc], ecx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov ecx, dword [ebp - 8]
cmp esi, ebx
je 0x4081d7
mov eax, dword [esi]
cmp eax, ebx
jne 0x4081c8
push ecx
mov ecx, esi
call fcn.004506c8
jmp 0x4081d7
push eax
lea ecx, [ebp - 8]
call fcn.004506c8
mov eax, dword [ebp - 8]
mov dword [ebp - 0xc], eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp + 0x14]
xor esi, esi
inc esi
cmp ecx, ebx
lea edi, [eax + eax + 2]
lea eax, [edi + 0x50]
mov dword [ebp - 0x28], 0xc
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x10], ebx
jne 0x408204
lea ecx, [ebp - 0x10]
push ebx
push eax
push ebx
push 0x8000004
lea eax, [ebp - 0x28]
push eax
push 0xffffffffffffffff
mov dword [ebp + 0x10], ecx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
cmp eax, 0xffffffff
jne 0x408222
xor eax, eax
cmp eax, ebx
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
jne 0x408232
mov ebx, esi
jmp 0x4082ff
push ebx
push ebx
push ebx
push 6
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov esi, eax
cmp esi, ebx
jne 0x40824c
xor ebx, ebx
inc ebx
jmp 0x4082ff
mov eax, edi
cdq
push edi
push dword [ebp + 8]
mov dword [esi], eax
lea eax, [esi + 8]
push eax
mov dword [esi + 4], edx
call fcn.00414839
push 0x48
lea eax, [esi + edi + 8]
push ebx
push eax
call fcn.004b4520
add esp, 0x18
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [ebp + 0x10]
push edi
push dword [eax]
lea eax, [ebp - 0x1a8]
push str._map:0x_p:_lu
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push 0xffffffffffffffff
push str.PECMD_LOAD
lea ecx, [ebp - 4]
call fcn.00450621
mov esi, dword [ebp + 0x18]
cmp word [esi], bx
je 0x4082cd
push str.logs:_
lea ecx, [ebp - 4]
call fcn.004465fa
push esi
lea ecx, [ebp - 4]
call fcn.004465fa
push 0x4c6cf8
lea ecx, [ebp - 4]
call fcn.004465fa
lea eax, [ebp - 0x1a8]
push eax
lea ecx, [ebp - 4]
call fcn.004465fa
push dword [ebp - 0x14]
lea ecx, [ebp - 4]
call fcn.004465fa
cmp dword [ebp + 0x14], ebx
je 0x408316
push dword [ebp - 4]
mov ecx, dword [ebp + 0xc]
call fcn.004506c8
lea ecx, [ebp - 4]
call fcn.0043fe25
lea ecx, [ebp - 0x10]
call fcn.00402d2b
lea ecx, [ebp - 8]
call fcn.0043fe25
mov eax, ebx
jmp 0x4083ad
xor eax, eax
mov dword [ebp - 0x38], ebx
lea edi, [ebp - 0x34]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x10
stosd dword es:[edi], eax
pop ecx
xor eax, eax
mov esi, 0x4e3d84
mov dword [ebp - 0x7c], 0x44
lea edi, [ebp - 0x78]
push esi
rep stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [ebp - 0x1c]
push eax
mov dword [ebp - 0x1c], ebx
call fcn.00403f71
mov byte [ebp - 0x18], al
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x7c]
push eax
push ebx
push ebx
push ebx
push 1
push ebx
push ebx
push dword [ebp - 4]
push dword [ebp - 0xc]
call fcn.004b3c7a
add esp, 0x2c
test eax, eax
je 0x40837e
push dword [ebp - 0x38]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push dword [ebp - 0x34]
call edi
cmp byte [ebp - 0x18], bl
je 0x40838c
push dword [ebp - 0x1c]
call fcn.00403f82
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea ecx, [ebp - 4]
call fcn.0043fe25
lea ecx, [ebp - 0x10]
call fcn.00402d2b
lea ecx, [ebp - 8]
call fcn.0043fe25
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret