Function at 0x401390
Capabilities:
Delete file
Enumerate pe sections
Move file
Parse pe header
Read file on windows
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x428
push ebx
push ebp
push esi
push edi
push 0x4040bc
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
jne 0x4013d5
push eax
push 0x4040b4
push 0x4040a4
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x428
ret
mov ebx, dword [sym.imp.MSVCRT.dll_fseek]
push 2
push 0
push esi
call ebx
push esi
call dword [sym.imp.MSVCRT.dll_ftell]
push 0
mov edi, eax
push 0
push esi
mov dword [esp + 0x38], edi
call ebx
push edi
call sub.MFC42.DLL_operatornew
mov ebx, eax
add esp, 0x20
test ebx, ebx
mov dword [esp + 0x18], ebx
jne 0x40142b
push eax
push 0x4040b4
push 0x404094
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x428
ret
push esi
push 1
push edi
push ebx
call dword [sym.imp.MSVCRT.dll_fread]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
mov dword [0x404e64], ebx
mov al, byte [ebx]
add esp, 0x14
cmp al, 0x4d
jne 0x4018df
cmp byte [ebx + 1], 0x5a
jne 0x4018df
mov ecx, dword [ebx + 0x3c]
lea eax, [ecx + ebx]
mov cl, byte [ecx + ebx]
cmp cl, 0x50
jne 0x4018df
cmp byte [eax + 1], 0x45
jne 0x4018df
xor edx, edx
mov dword [0x404e60], eax
mov dx, word [eax + 0x14]
lea ecx, [edx + eax + 0x18]
mov dword [0x404e5c], ecx
mov dword [0x404e58], ecx
mov eax, dword [eax + 0x80]
push eax
call fcn.00401340
add esp, 4
add eax, ebx
mov ecx, eax
cmp dword [ecx], 0
jne 0x4014c5
mov edx, dword [ecx + 4]
test edx, edx
jne 0x4014c5
mov edx, dword [ecx + 8]
test edx, edx
jne 0x4014c5
mov edx, dword [ecx + 0xc]
test edx, edx
jne 0x4014c5
mov edx, dword [ecx + 0x10]
test edx, edx
je 0x4014ca
add ecx, 0x14
jmp 0x4014a4
mov edx, dword [0x404e60]
sub ecx, eax
add ecx, 0x14
mov dword [edx + 0x84], ecx
mov eax, dword [0x404e58]
add eax, 0x28
xor edx, edx
mov dword [0x404e58], eax
mov edi, dword [eax + 0x24]
or edi, 0xc0000000
mov dword [eax + 0x24], edi
mov eax, dword [0x404e5c]
mov ecx, dword [0x404e60]
mov dword [0x404e58], eax
cmp word [ecx + 6], dx
jbe 0x40153b
mov ecx, 2
mov edi, str.mydogimp
mov esi, eax
xor ebp, ebp
repe cmpsd dword [esi], dword es:[edi]
je 0x401792
mov esi, dword [0x404e60]
add eax, 0x28
xor ecx, ecx
mov dword [0x404e58], eax
mov cx, word [esi + 6]
inc edx
cmp edx, ecx
jb 0x40150c
sub eax, 0x28
mov edx, dword [str.mydogimp]
mov dword [0x404e58], eax
mov ebp, dword [eax + 0xc]
mov ecx, dword [eax + 8]
mov edi, dword [eax + 0x10]
add ebp, ecx
mov ecx, dword [eax + 0x14]
add eax, 0x28
mov dword [0x404e58], eax
add ebp, 0xfff
mov dword [eax], edx
mov edx, dword [0x404e58]
mov eax, dword [0x40408c]
add ecx, edi
mov dword [edx + 4], eax
mov edx, dword [0x404e58]
mov eax, 0x1000
mov dword [esp + 0x20], ecx
shr ebp, 0xc
mov dword [edx + 8], eax
mov edx, dword [0x404e58]
shl ebp, 0xc
mov dword [edx + 0xc], ebp
mov edx, dword [0x404e58]
mov dword [esp + 0x10], ebp
mov dword [edx + 0x10], eax
mov eax, dword [0x404e58]
mov dword [eax + 0x14], ecx
mov ecx, dword [0x404e58]
mov dword [ecx + 0x24], 0xe0000040
mov eax, dword [0x404e60]
mov edx, dword [eax + 0x80]
mov edi, dword [eax + 0x84]
push edx
call fcn.00401340
mov esi, eax
mov eax, edi
add esi, ebx
mov ecx, eax
mov edi, 0x405638
mov edx, ecx
add esp, 4
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x404e60]
mov eax, dword [ecx + 0x84]
lea edx, [eax + 0x405624]
add eax, 0x14
mov dword [ecx + 0x84], eax
mov eax, dword [0x404e60]
mov ebx, dword [eax + 0x84]
add ebx, 0x405638
mov ecx, ebx
sub ecx, 0x405638
add ebp, ecx
or ecx, 0xffffffff
mov dword [esp + 0x24], ebp
lea eax, [ebp + 0x10]
mov ebp, dword [esp + 0x444]
mov dword [ebx + 8], eax
mov dword [ebx], eax
xor eax, eax
mov edi, ebp
mov dword [ebx + 0xc], eax
mov dword [ebx + 4], eax
repne scasb al, byte es:[edi]
not ecx
mov eax, ecx
mov esi, ebp
lea edi, [ebx + 0x12]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x440]
or ecx, 0xffffffff
mov edi, esi
xor eax, eax
add edx, 0x14
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ebp
mov eax, ecx
or ecx, 0xffffffff
inc eax
mov dword [esp + 0x14], eax
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [ecx + ebx + 0x13]
mov ecx, dword [esp + 0x14]
mov eax, ecx
xor ebx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x24]
mov edi, ebp
mov dword [edx - 0x14], esi
add esi, 8
or ecx, 0xffffffff
mov dword [edx - 4], esi
mov dword [edx - 0x10], ebx
mov dword [edx - 0xc], ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, dword [esp + 0x43c]
mov edi, ebp
lea ecx, [ecx + esi + 0xb]
mov dword [edx - 8], ecx
mov eax, dword [0x404e60]
mov ecx, dword [esp + 0x10]
inc word [eax + 6]
mov eax, dword [0x404e60]
mov dword [eax + 0x80], ecx
mov eax, dword [0x404e60]
or ecx, 0xffffffff
mov esi, dword [eax + 0x50]
add esi, 0x1000
mov dword [eax + 0x50], esi
xor eax, eax
mov dword [edx], ebx
mov dword [edx + 0xc], ebx
mov dword [edx + 0x10], ebx
mov dword [edx + 8], ebx
mov dword [edx + 4], ebx
lea edx, [esp + 0x50]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x50]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str..bak
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x50]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [esp + 0x50]
push ecx
push ebp
call dword [sym.imp.MSVCRT.dll_rename]
add esp, 8
test eax, eax
je 0x4017ab
push ebx
push 0x4040b4
push 0x40405c
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebp
mov eax, 4
pop ebx
add esp, 0x428
ret
push ebx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, 0x100
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x428
ret
push 0x404058
push ebp
call dword [sym.imp.MSVCRT.dll_fopen]
mov edx, dword [0x404e58]
mov ebp, eax
mov ecx, 0xa
xor eax, eax
lea edi, [esp + 0x30]
add edx, 0x28
rep stosd dword es:[edi], eax
add esp, 8
mov dword [0x404e58], edx
mov edi, edx
mov ecx, 0xa
lea esi, [esp + 0x28]
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
je 0x401878
mov ecx, dword [0x404e64]
mov eax, dword [ecx + 0x3c]
mov esi, eax
add eax, 0xffffff80
mov dword [ecx + 0x3c], eax
mov eax, dword [0x404e64]
mov edi, dword [eax + 0x3c]
cmp edi, ebx
jne 0x40182c
push ebx
push 0x4040b4
push 0x404030
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebp
mov eax, 4
pop ebx
add esp, 0x428
ret
mov ecx, dword [0x404e60]
xor eax, eax
mov ax, word [ecx + 6]
lea edx, [eax + eax*4]
lea ecx, [edx*8 + 0xf8]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x10], ecx
mov eax, ecx
add esi, edx
add edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [0x404e64]
mov ecx, 0x20
mov edi, dword [esi + 0x3c]
mov esi, dword [esp + 0x10]
add edi, esi
add edi, edx
rep stosd dword es:[edi], eax
jmp 0x40187c
mov edx, dword [esp + 0x18]
cmp ebp, ebx
je 0x401770
mov ecx, dword [esp + 0x1c]
mov esi, dword [sym.imp.MSVCRT.dll_fwrite]
push ebp
push 1
push ecx
push edx
call esi
mov edx, dword [esp + 0x30]
push ebx
push edx
push ebp
call dword [sym.imp.MSVCRT.dll_fseek]
push ebp
push 1
push 0x1000
push 0x405638
call esi
push ebp
push ebx
push ebx
push 0x405638
call esi
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esp + 0x58]
add esp, 0x40
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x428
ret
push 0
push 0x4040b4
push 0x404020
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push ebx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, 2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x428
ret