Function at 0x401eb0
Capabilities:
Access peb ldr_data
Clear file content
Get graphical window text
Get kernel32 base address
Get process heap flags
Get process heap force flags
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, edx
mov esi, dword fs:[0x18]
sub esp, 0x4c
mov dword [ebp - 0x2c], eax
mov eax, dword [0x40a40c]
mov dword [esp], eax
call sym.unk_136
sub esp, 4
lea edx, [eax + 1]
lea eax, [eax + eax + 4]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov dword [ebp - 0x30], edx
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call sym.unk_180
sub esp, 0xc
test eax, eax
je 0x4022f0
mov edx, 0xfffffeff
mov edi, eax
lea eax, [eax + 2]
mov ecx, dword [ebp - 0x30]
mov word [eax - 2], dx
mov dword [ebp - 0x34], eax
mov dword [esp + 4], eax
mov eax, dword [0x40a40c]
mov dword [esp + 8], ecx
mov dword [esp], eax
call sym.unk_160
sub esp, 0xc
mov ecx, eax
lea edx, [eax + 1]
cmp ebx, 2
je 0x402080
cmp ebx, 3
je 0x4021c0
cmp ebx, 1
je 0x40209b
lea eax, [ebp - 0x1c]
mov dword [esp + 0xc], ecx
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x34]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], eax
mov dword [esp + 4], 0x400
mov dword [esp], 0
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x1c], 0
call sym.unk_211
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x30]
sub esp, 0x20
test eax, eax
jne 0x402290
mov eax, dword [ebp - 0x34]
mov dword [esp + 0xc], ecx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [ebp - 0x30], ecx
mov esi, dword fs:[0x18]
call sym.unk_211
sub esp, 0x20
mov ebx, eax
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call sym.unk_180
mov ecx, dword [ebp - 0x30]
sub esp, 0xc
test eax, eax
je 0x4022d0
mov dword [esp + 0x10], eax
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x34]
mov dword [esp + 0xc], ecx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0
call sym.unk_211
sub esp, 0x20
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call sym.unk_198
mov edx, dword [ebp - 0x30]
sub esp, 0xc
mov edi, edx
jmp 0x40209e
test edx, edx
je 0x40209b
mov ebx, dword [ebp - 0x34]
mov eax, edi
lea ecx, [ebx + ecx*2]
lea esi, [esi]
rol word [eax], 8
add eax, 2
cmp ecx, eax
jne 0x402090
lea ebx, [edx + edx]
mov eax, dword [ebp - 0x2c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], 0
mov dword [esp + 8], 2
mov dword [esp + 4], 0x40000000
mov dword [esp], eax
call sym.unk_128
sub esp, 0x1c
mov esi, eax
cmp eax, 0xffffffff
je 0x402302
lea eax, [ebp - 0x1c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp], esi
call sym.unk_191
sub esp, 0x14
test eax, eax
je 0x402180
mov dword [esp], esi
call sym.unk_90
sub esp, 4
mov dword [esp], esi
call sym.unk_161
sub esp, 4
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call sym.unk_198
mov eax, dword [0x40a40c]
sub esp, 0xc
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xb9
mov dword [esp], eax
call sym.unk_96
xor eax, eax
sub esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call dbg.ShowLastError
mov dword [esp], esi
call sym.unk_161
sub esp, 4
mov eax, dword fs:[0x18]
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call sym.unk_198
mov eax, 1
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0xc], edx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov dword [esp], 0xfde9
mov dword [ebp - 0x30], edx
call sym.unk_211
sub esp, 0x20
mov ebx, eax
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call sym.unk_180
mov edx, dword [ebp - 0x30]
sub esp, 0xc
test eax, eax
je 0x4022d0
mov dword [esp + 0xc], edx
mov dword [esp + 8], edi
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0
mov dword [esp], 0xfde9
mov dword [ebp - 0x30], eax
call sym.unk_211
sub esp, 0x20
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call sym.unk_198
mov ecx, dword [ebp - 0x30]
sub esp, 0xc
mov edi, ecx
jmp 0x40209e
mov eax, dword [ebp - 0x2c]
call dbg.AlertUnicodeCharactersLost
mov ecx, dword [ebp - 0x30]
cmp eax, 2
jne 0x401fa9
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call sym.unk_198
mov eax, 2
sub esp, 0xc
jmp 0x402170
call dbg.ShowLastError
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
jmp 0x4021a5
call dbg.ShowLastError
lea esp, [ebp - 0xc]
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
call dbg.ShowLastError
jmp 0x402190