Function at 0x1004a870
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov ecx, dword [esp + 0xc]
sub esp, 0x84
mov eax, ecx
and eax, 0x11
push ebx
push edi
cmp al, 0x11
je 0x1004ae93
mov ebx, dword [esp + 0x94]
test cl, 0x20
je 0x1004a8ab
mov edi, dword [esp + 0x90]
mov edi, dword [edi + 8]
cmp edi, ebx
jb 0x1004ae93
sub edi, ebx
jmp 0x1004a8b9
mov edi, ebx
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x1004a8b0
sub edi, ecx
push ebp
mov ebp, dword [sym.imp.msvcrt.dll_malloc]
push esi
push 0x153
call ebp
mov esi, eax
add esp, 4
test esi, esi
je 0x1004a913
mov eax, edi
shr eax, 1
lea eax, [eax + eax*2]
inc eax
cmp eax, edi
jb 0x1004ae79
cmp eax, 0x1fffffff
ja 0x1004ae79
mov dword [esp + 0x34], eax
shl eax, 2
push eax
call ebp
add esp, 4
mov dword [esp + 0x30], eax
mov dword [esp + 0x38], 0
test eax, eax
jne 0x1004a923
push esi
call dword [sym.imp.msvcrt.dll_free]
add esp, 4
mov eax, 0xc
pop esi
pop ebp
pop edi
pop ebx
add esp, 0x84
ret
mov dword [esp + 0x24], ebx
lea eax, [edi + ebx]
mov ebx, dword [esp + 0xa0]
mov dword [esp + 0x28], eax
lea eax, [esi + 0xd0]
mov dword [esp + 0x40], esi
mov dword [esp + 0x2c], 0
mov dword [esp + 0x3c], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x6c], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x70], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x54], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x80], 0
mov dword [esp + 0x5c], 0
mov dword [esp + 0x84], 0
mov dword [esp + 0x60], 0
mov dword [esp + 0x88], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x8c], 0
mov dword [esp + 0x68], 0
mov dword [esp + 0x90], 0
push 0x100
mov dword [esi + 0x38], eax
lea eax, [esi + 0x50]
push 0
push eax
mov dword [esi + 8], 0x100
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x18], ebx
mov dword [esi + 0x28], 0
mov dword [esi + 0x2c], 0
mov dword [esi + 0x30], 0
mov dword [esi + 0x3c], 0
mov dword [esi + 0x40], 0
mov dword [esi + 0x44], 0
mov dword [esi + 0x34], 1
call sub.msvcrt.dll_memset
mov ebp, dword [sym.imp.msvcrt.dll_realloc]
add esp, 0xc
mov dword [esi + 0x48], 0
cmp dword [esp + 0x2c], 0
jne 0x1004aaec
mov ecx, dword [esp + 0x34]
cmp dword [esp + 0x38], ecx
jl 0x1004aad2
lea eax, [ecx + 1]
cdq
sub eax, edx
sar eax, 1
lea edi, [eax + eax*2]
cmp ecx, edi
jge 0x1004aad2
lea eax, [edi*4]
push eax
push dword [esp + 0x34]
call ebp
add esp, 8
test eax, eax
jne 0x1004aaca
mov eax, dword [esp + 0x2c]
mov ecx, 0xc
test eax, eax
mov dword [esp + 0x24], 0x1005bd8c
mov dword [esp + 0x28], 0x1005bd8c
cmove eax, ecx
mov dword [esp + 0x2c], eax
jmp 0x1004aad2
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], edi
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x30]
mov dword [ecx + eax*4], 0x4000000
mov eax, dword [esp + 0x38]
inc eax
mov dword [esp + 0x38], eax
jmp 0x1004aaf0
mov eax, dword [esp + 0x38]
dec eax
mov dword [esi + 0x20], eax
lea eax, [esp + 0x24]
test bl, 1
je 0x1004ab0d
push 0x80
push eax
call fcn.100478b0
add esp, 8
jmp 0x1004ab30
test bl, 0x10
je 0x1004ab1d
push eax
call fcn.1004a700
add esp, 4
jmp 0x1004ab30
push 0x80
push 0x80
push eax
call fcn.10047700
add esp, 0xc
cmp dword [esp + 0x2c], 0
jne 0x1004abab
mov ecx, dword [esp + 0x34]
cmp dword [esp + 0x38], ecx
jl 0x1004ab91
lea eax, [ecx + 1]
cdq
sub eax, edx
sar eax, 1
lea edi, [eax + eax*2]
cmp ecx, edi
jge 0x1004ab91
lea eax, [edi*4]
push eax
push dword [esp + 0x34]
call ebp
add esp, 8
test eax, eax
jne 0x1004ab89
mov eax, dword [esp + 0x2c]
mov ecx, 0xc
test eax, eax
mov dword [esp + 0x24], 0x1005bd8c
mov dword [esp + 0x28], 0x1005bd8c
cmove eax, ecx
mov dword [esp + 0x2c], eax
jmp 0x1004ab91
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], edi
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x30]
mov dword [ecx + eax*4], 0x4000000
mov eax, dword [esp + 0x38]
inc eax
mov dword [esp + 0x38], eax
jmp 0x1004abaf
mov eax, dword [esp + 0x38]
mov ebp, dword [esi + 0x38]
dec eax
mov dword [esi + 0x24], eax
cmp dword [esp + 0x2c], 0
mov dword [esp + 0x14], ebp
jne 0x1004ac93
mov ebx, 0xffffff81
mov dword [esp + 0x1c], ebx
mov edi, edi
cmp byte [ebx + ebp - 1], 0
mov eax, ebx
mov dword [esp + 0x18], eax
jne 0x1004ac85
mov eax, dword [esi + 0xc]
lea ecx, [ebx - 1]
add eax, 7
cdq
and edx, 7
lea edi, [edx + eax]
movzx eax, cl
mov ecx, dword [esi + 0x14]
xor edx, edx
sar edi, 3
mov dword [esp + 0x20], eax
test edi, edi
jle 0x1004ac81
cmp byte [ecx + eax], 0
jne 0x1004ac18
add ecx, dword [esi + 8]
inc edx
cmp edx, edi
jl 0x1004ac08
jmp 0x1004ac81
mov al, byte [esi + 0x34]
inc dword [esi + 0x34]
cmp dword [esp + 0x1c], 0x7f
mov byte [esp + 0x13], al
mov byte [ebx + ebp - 1], al
jg 0x1004ac7d
lea ecx, [ecx]
cmp byte [ebx + ebp], 0
jne 0x1004ac77
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x14]
add eax, 7
cdq
and edx, 7
movzx ebp, bl
lea edi, [edx + eax]
xor edx, edx
sar edi, 3
test edi, edi
jle 0x1004ac66
mov eax, dword [esp + 0x20]
mov al, byte [ecx + eax]
cmp al, byte [ecx + ebp]
jne 0x1004ac73
add ecx, dword [esi + 8]
inc edx
cmp edx, edi
jl 0x1004ac52
mov ebp, dword [esp + 0x14]
mov al, byte [esp + 0x13]
mov byte [ebx + ebp], al
jmp 0x1004ac77
mov ebp, dword [esp + 0x14]
inc ebx
cmp ebx, 0x7f
jle 0x1004ac30
mov ebx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
inc ebx
mov dword [esp + 0x1c], ebx
cmp eax, 0x7f
jle 0x1004abd0
mov eax, dword [esp + 0x38]
mov dword [esi + 0x1c], eax
mov eax, dword [esp + 0x38]
shl eax, 2
push eax
push dword [esp + 0x34]
call dword [sym.imp.msvcrt.dll_realloc]
add esp, 8
mov dword [esi + 4], eax
test eax, eax
jne 0x1004acdf
mov eax, dword [esp + 0x2c]
mov ecx, 0xc
test eax, eax
mov dword [esp + 0x24], 0x1005bd8c
mov dword [esp + 0x28], 0x1005bd8c
cmove eax, ecx
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x30]
mov dword [esi + 4], eax
cmp dword [esp + 0x2c], 0
jne 0x1004adef
mov ebp, dword [esp + 0x20]
lea edx, [eax + 4]
xor edi, edi
mov ecx, dword [edx]
mov ebx, edx
mov eax, ecx
mov dword [esp + 0x20], edx
and eax, 0x7c000000
add edx, 4
cmp eax, 0x34000000
ja 0x1004ad74
je 0x1004ad31
cmp eax, 0x8000000
je 0x1004ad66
cmp eax, 0x24000000
je 0x1004ad31
cmp eax, 0x2c000000
je 0x1004ad82
cmp edi, dword [esi + 0x40]
jle 0x1004ad2f
mov ebp, dword [esp + 0x14]
mov dword [esi + 0x40], edi
xor edi, edi
and ecx, 0x7c000000
cmp ecx, 0x4000000
jne 0x1004acf3
mov eax, dword [esi + 0x40]
test eax, eax
je 0x1004adef
inc eax
push eax
call dword [sym.imp.msvcrt.dll_malloc]
mov ecx, eax
add esp, 4
mov dword [esi + 0x3c], ecx
test ecx, ecx
jne 0x1004adc5
mov dword [esi + 0x40], eax
jmp 0x1004adef
test edi, edi
cmovne ebx, dword [esp + 0x14]
inc edi
mov dword [esp + 0x14], ebx
jmp 0x1004ad31
cmp eax, 0x38000000
je 0x1004ad31
cmp eax, 0x3c000000
jne 0x1004ad23
mov edx, dword [esp + 0x20]
jmp 0x1004ad90
and ecx, 0x3ffffff
lea edx, [edx + ecx*4]
mov ecx, dword [edx]
mov eax, ecx
and eax, 0x7c000000
cmp eax, 0x30000000
je 0x1004ad23
cmp eax, 0x48000000
je 0x1004ad23
cmp eax, 0x44000000
je 0x1004ad90
or dword [esi + 0x28], 4
jmp 0x1004adef
mov edx, dword [esi + 0x40]
test edx, edx
jle 0x1004adec
lea esp, [esp]
mov ebx, dword [ebp]
lea ebp, [ebp + 4]
mov eax, ebx
and eax, 0x7c000000
cmp eax, 0x8000000
jne 0x1004add0
mov byte [ecx], bl
dec edx
inc ecx
test edx, edx
jg 0x1004add0
mov byte [ecx], 0
xor ecx, ecx
xor edi, edi
cmp dword [esp + 0x2c], ecx
jne 0x1004ae33
mov edx, dword [esi + 4]
add edx, 4
nop
mov eax, dword [edx]
lea edx, [edx + 4]
and eax, 0x7c000000
cmp eax, 0x24000000
je 0x1004ae76
cmp eax, 0x28000000
jne 0x1004ae24
cmp ecx, edi
mov eax, ecx
cmovle eax, edi
dec ecx
mov edi, eax
jmp 0x1004ae00
cmp eax, 0x4000000
jne 0x1004ae00
test ecx, ecx
je 0x1004ae33
or dword [esi + 0x28], 4
mov ecx, dword [esp + 0x98]
mov eax, dword [esi + 0x44]
mov dword [esi + 0x4c], edi
mov dword [esi], 0xd245
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x2c]
mov dword [ecx + 0xc], esi
mov dword [ecx], 0xf265
test eax, eax
je 0x1004a918
push ecx
call fcn.1004dbd0
mov eax, dword [esp + 0x30]
add esp, 4
pop esi
pop ebp
pop edi
pop ebx
add esp, 0x84
ret
inc ecx
jmp 0x1004ae00
push esi
call dword [sym.imp.msvcrt.dll_free]
add esp, 4
mov eax, 0x10
pop esi
pop ebp
pop edi
pop ebx
add esp, 0x84
ret
pop edi
mov eax, 0x10
pop ebx
add esp, 0x84
ret