Function at 0x4049e0
Capabilities:
Access peb ldr_data
Get kernel32 base address
Get process heap force flags
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x46ef58
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
push ebx
push ebp
push esi
push edi
mov ebp, ecx
mov dword [esp + 0x30], 0
call fcn.00460104
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea edi, [eax + 0x10]
mov dword [esp + 0x10], edi
mov eax, dword [esp + 0x48]
mov ecx, dword [eax + 0x1c]
push 0
push 0
push 0x408
push ecx
mov byte [esp + 0x40], 1
call dword [sym.imp.user32.dll_SendMessageA]
mov edx, dword [esp + 0x38]
mov ebx, eax
push 0x473bb0
push edx
mov dword [esp + 0x20], ebx
call fcn.004481c9
mov ecx, dword [ebp + 0x1c]
mov edx, dword [ebp + 0x18]
add esp, 8
push 0
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0x20]
push eax
push ecx
push edx
call fcn.004485f0
lea esi, [eax*4 + 4]
push esi
mov dword [ebp + 0xc], eax
call fcn.00447215
mov dword [0x494a64], eax
mov eax, dword [ebp + 0x20]
push eax
call fcn.00447215
mov dword [0x494a6c], eax
mov ecx, dword [ebp + 0x20]
shl ecx, 1
push ecx
call fcn.00447215
mov edx, dword [0x494a64]
add esp, 0xc
test edx, edx
mov dword [0x494a70], eax
je 0x404e5c
mov ecx, dword [0x494a6c]
test ecx, ecx
je 0x404e5c
test eax, eax
je 0x404e5c
mov edi, edx
mov ecx, esi
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
push 0
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x18]
push 0x18
push edi
call fcn.00448124
mov eax, dword [0x494a64]
push edi
push esi
push 1
push eax
call fcn.00448049
add esp, 0x1c
cmp eax, esi
je 0x404b32
push 0
push 0
push 0x473f08
call fcn.00463fa9
mov ecx, ebp
call fcn.004037a0
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov byte [esp + 0x30], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404eaf
mov ecx, dword [eax]
push eax
jmp 0x404eaa
mov eax, dword [esp + 0x44]
xor edx, edx
push eax
mov ecx, ebp
mov dword [ebp + 0x48], edx
mov dword [ebp + 0x4c], edx
mov dword [ebp + 0x50], edx
call fcn.004037d0
mov ecx, dword [esp + 0x40]
add eax, ecx
cmp ecx, eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ecx
jl 0x404bf1
push edi
call fcn.00447f0f
mov eax, dword [0x494a64]
push eax
call fcn.00447227
mov ecx, dword [0x494a6c]
push ecx
call fcn.00447227
mov edx, dword [0x494a70]
push edx
call fcn.00447227
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
add esp, 0x10
mov byte [esp + 0x30], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404bae
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
mov dword [esp + 0x30], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404bd4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
add esp, 0x24
ret 0x24
mov ebx, dword [esp + 0x18]
xor edx, edx
cmp dword [ebp + 4], 0x7ff
mov esi, dword [esp + 0x58]
jbe 0x404c03
mov dword [ebp + 4], edx
inc dword [esi]
mov edi, dword [esp + 0x50]
mov ecx, dword [esi]
cmp ecx, dword [edi]
jbe 0x404c51
mov edx, dword [esp + 0x48]
mov eax, dword [edx + 0x1c]
push 0
inc ebx
push ebx
push 0x402
push eax
mov dword [esp + 0x28], ebx
call dword [sym.imp.user32.dll_SendMessageA]
mov ecx, dword [esi]
add ecx, dword [esp + 0x54]
push ebx
lea edx, [esp + 0x14]
push 0x473f00
push edx
mov dword [edi], ecx
call fcn.00402a00
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x58]
add esp, 0xc
push eax
call fcn.0045f49d
push 0x38
push 0x473de4
lea eax, [ebp + 0x28]
push 0xfffffffffffffff1
push eax
call fcn.0042e4b0
add esp, 0x10
test eax, eax
jne 0x404dae
mov ecx, dword [esp + 0x44]
mov eax, dword [0x494a64]
mov edx, dword [eax + ecx*4]
movzx ecx, byte [ebp + 0x25]
mov esi, edx
and edx, 0x7fffffff
mov edi, edx
and esi, 0x80000000
shl edi, cl
test esi, esi
mov dword [esp + 0x24], 0
je 0x404ca1
mov ebx, dword [ebp + 0x20]
jmp 0x404cb4
mov ebx, dword [esp + 0x44]
mov eax, dword [eax + ebx*4 + 4]
and eax, 0x7fffffff
sub eax, edx
shl eax, cl
mov ebx, eax
push 0
push edi
mov edi, dword [esp + 0x1c]
push edi
call fcn.00448124
mov edx, dword [0x494a70]
push edi
push ebx
push 1
push edx
call fcn.00448049
add esp, 0x1c
xor ecx, ecx
cmp eax, ebx
mov dword [ebp + 0x2c], eax
jne 0x404b04
xor eax, eax
cmp ecx, eax
jne 0x404b04
test esi, esi
je 0x404d0d
mov esi, dword [0x494a70]
mov edi, dword [0x494a6c]
mov ecx, ebx
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x404d4d
mov ecx, dword [0x494a6c]
mov edx, dword [ebp + 0x20]
lea eax, [ebp + 0x28]
mov dword [ebp + 0x34], ecx
mov dword [ebp + 0x38], edx
mov ecx, dword [0x494a70]
push 3
push eax
mov dword [eax], ecx
call fcn.0042e6c0
add esp, 8
cmp eax, 1
jne 0x404e41
mov eax, dword [ebp + 0x20]
mov edx, dword [ebp + 0x38]
mov ebx, eax
sub ebx, edx
cmp ebx, eax
jne 0x404e41
mov eax, dword [0x494a6c]
mov ecx, dword [esp + 0x3c]
push 0
lea edx, [esp + 0x20]
push edx
mov edx, dword [ecx]
push ebx
push eax
push edx
call dword [sym.imp.kernel32.dll_WriteFile]
mov eax, dword [esp + 0x1c]
mov edx, dword [ebp + 4]
add edx, eax
cmp eax, ebx
mov dword [ebp + 4], edx
jne 0x404e41
lea eax, [ebp + 0x28]
push eax
call fcn.0042fcf0
add esp, 4
test eax, eax
jne 0x404e41
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x40]
inc eax
cmp eax, ecx
mov dword [esp + 0x44], eax
jl 0x404beb
mov edi, dword [esp + 0x14]
jmp 0x404b5f
call fcn.00460104
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x58], eax
mov ebp, dword [ebp + 0x40]
test ebp, ebp
mov byte [esp + 0x30], 2
jne 0x404dd2
mov ebp, 0x473de0
push ebp
lea eax, [esp + 0x5c]
push 0x473ecc
push eax
call fcn.00402a00
mov esi, dword [esp + 0x64]
add esp, 0xc
push 0
push 0
push esi
call fcn.00463fa9
mov ecx, dword [0x494a64]
push ecx
call fcn.00447227
mov edx, dword [0x494a6c]
push edx
call fcn.00447227
mov eax, dword [0x494a70]
push eax
call fcn.00447227
lea eax, [esi - 0x10]
add esp, 0xc
mov byte [esp + 0x30], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404b0b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
jmp 0x404b0b
mov ecx, ebp
call fcn.004037a0
lea ecx, [esp + 0x10]
call fcn.00401620
lea ecx, [esp + 0x38]
call fcn.00401620
jmp 0x404ed5
push 0
push 0
push 0x473e9c
call fcn.00463fa9
mov eax, dword [0x494a64]
push eax
call fcn.00447227
mov ecx, dword [0x494a6c]
push ecx
call fcn.00447227
mov edx, dword [0x494a70]
push edx
call fcn.00447227
add edi, 0xfffffff0
add esp, 0xc
mov byte [esp + 0x30], 0
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x404eaf
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
mov dword [esp + 0x30], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404ed5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x28]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x24
ret 0x24