Function at 0x40d400
Capabilities:
Enumerate pe sections
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1818
call fcn.0041b8a0
mov eax, dword [0x4464d0]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1814], ecx
mov ecx, dword [ebp + 0x18]
mov dword [ebp - 0x1818], ecx
lea ecx, [ebp - 0x1804]
push 0x400
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x40d451
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00418fae
mov esp, ebp
pop ebp
ret
push edi
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
lea eax, [ebp - 0x1804]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40d49f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.IOjuHZcS0kMr576WR16MoDKdhzlpK6zQZ3N6vgdd59gwtvxtoz3XRmHtfvNrHzRf1a_rDf4
push 0
call fcn.0040c4d0
add esp, 0xc
xor eax, eax
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00418fae
mov esp, ebp
pop ebp
ret
push 0x1000
lea eax, [ebp - 0x1004]
push 0
push eax
call fcn.0041bd20
add esp, 0xc
lea eax, [ebp - 0x1808]
push 0
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40d503
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Hbga0VEX5KyjUEWngDyHkTlqDpCERVw_jRZZxfc1v85toz3XRmHtfvNyEmQDoJ2FxWMc
push 0
call fcn.0040c4d0
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00418fae
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x1808], 0x1000
je 0x40d516
push str.GQPFr6R6V4eBNp6FKnIno5FTRX6rEmWB1T2nymXmeMJUKPVz9i0adR3VrtlCg
jmp 0x40d529
mov eax, 0x5a4d
cmp word [ebp - 0x1004], ax
je 0x40d54b
push str.GQPFr6R6V4eBNp6FKnIno5FTRX6rEmWB3zOniwHFTpFPbeB_8jFmL3ZXtQ
push 0
call fcn.0040c4d0
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00418fae
mov esp, ebp
pop ebp
ret
push esi
lea esi, [ebp - 0x1004]
add esi, dword [ebp - 0xfc8]
cmp dword [esi], 0x4550
je 0x40d588
push str.FotyVJW9NYywPWkMg59JU36oN1nV0AHzxSrPf9zKOl9idfMyrnwWmR
push 0
call fcn.0040c4d0
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
xor eax, eax
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00418fae
mov esp, ebp
pop ebp
ret
push ebx
mov ebx, dword [esi + 0x78]
test ebx, ebx
jne 0x40d597
push str.FotyVJW9NYywPWkMg59JU36oN1nV0AHz2TPrPdhUKLE3ty1VYRD8r4ixE1SvEJ2DP7RSnHSZXAZBg8
jmp 0x40d5e3
mov eax, dword [esi + 0x7c]
lea ecx, [esi + 0x18]
mov dword [ebp - 0x180c], eax
xor edx, edx
movzx eax, word [esi + 0x14]
add ecx, eax
movzx eax, word [esi + 6]
mov dword [ebp - 0x1810], eax
test eax, eax
jle 0x40d5de
lea esp, [esp]
mov esi, dword [ecx + 0xc]
cmp ebx, esi
jb 0x40d5d6
mov eax, dword [ecx + 8]
add eax, esi
cmp ebx, eax
jbe 0x40d607
mov eax, dword [ebp - 0x1810]
inc edx
add ecx, 0x28
cmp edx, eax
jl 0x40d5c0
push str.E7q1Np6MPns5lIRic3CyIVnW9T2nyhiqeMlXZ_NvtzBfIgLgroXlFFS1EJ6UOr6HYnq2tOI
push 0
call fcn.0040c4d0
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
pop esi
xor eax, eax
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00418fae
mov esp, ebp
pop ebp
ret
mov eax, dword [ecx + 0x14]
push 0
sub eax, esi
push 0
add eax, ebx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [ebp - 0x180c]
call fcn.0041835e
mov esi, eax
add esp, 4
test esi, esi
jne 0x40d635
push str.LpM6IuW7R1ecutd6RtY04cgPpzzARAWip7VYEYCeP4WgeHsrmJxBZR9UVw
jmp 0x40d5e3
push dword [ebp - 0x180c]
push 0
push esi
call fcn.0041bd20
add esp, 0xc
lea eax, [ebp - 0x1808]
push 0
push eax
push dword [ebp - 0x180c]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40d682
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.D5gfeD6lkJyeqs1Ss7cDrLcAetp0Hoo0372J3woGuzpwuUcWqhcnZ99MZLPepXHlbQ
push 0
call fcn.0040c4d0
push esi
call fcn.00418fbd
add esp, 0x10
jmp 0x40d5ed
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x180c]
cmp eax, dword [ebp - 0x1808]
je 0x40d6bf
push str.DBG2lVBOebkAXdX3LrzGFtq9UZ84Ea3J1s1F6mtjrYJG7VYmZVvooZPYdNKanwctjO1HL8
push 0
call fcn.0040c4d0
push esi
call fcn.00418fbd
add esp, 0xc
xor eax, eax
pop ebx
pop esi
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00418fae
mov esp, ebp
pop ebp
ret
mov edi, dword [esi + 0x1c]
mov eax, dword [ebp + 0xc]
sub edi, ebx
add edi, esi
cmp dword [ebp + 0x14], 0
mov ebx, dword [edi + eax*4]
mov dword [ebp - 0x1810], ebx
jne 0x40d6f4
push esi
call fcn.00418fbd
add esp, 4
mov eax, ebx
pop ebx
pop esi
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00418fae
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x1814]
push 4
push 0x1000
shl eax, 2
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebx, eax
test ebx, ebx
jne 0x40d752
push esi
call fcn.00418fbd
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x1814]
push eax
lea eax, [ecx*4]
push eax
push str.pfh7wc0W1X4LhinyVzfvmLZCeICGMreLENIxVJp7Vr7L1UkW6ylfe1LVth49BiHmtcSJBYI
push ebx
call fcn.0040c4d0
add esp, 0x10
xor eax, eax
pop ebx
pop esi
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00418fae
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x1814]
lea eax, [ecx*4]
push eax
push 0
push ebx
call fcn.0041bd20
xor edx, edx
add esp, 0xc
cmp dword [esi + 0x14], edx
jbe 0x40d785
mov ecx, ebx
sub edi, ebx
mov eax, dword [edi + ecx]
lea ecx, [ecx + 4]
mov dword [ecx - 4], eax
inc edx
cmp edx, dword [esi + 0x14]
jb 0x40d776
push esi
call fcn.0041971d
mov eax, dword [ebp - 0x1818]
add esp, 4
mov ecx, dword [ebp - 4]
xor ecx, ebp
mov dword [eax], ebx
mov eax, dword [ebp - 0x1810]
pop ebx
pop esi
pop edi
call fcn.00418fae
mov esp, ebp
pop ebp
ret