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

Disassembly:
sub esp, 0x144
mov eax, dword [esp + 0x148]
push ebx
mov ebx, dword [esp + 0x150]
push ebp
push esi
mov esi, dword [eax + 0x10]
mov eax, dword [ebx]
mov ecx, ebx
add ecx, esi
cmp eax, 0xffffffff
push edi
mov dword [esp + 0x38], ecx
je 0x4789e1
jmp 0x478454
mov ecx, dword [esp + 0x38]
cmp ebx, ecx
jae 0x4789e1
cmp eax, 0x20
jne 0x47880a
cmp byte [ebx + 8], 1
jne 0x478473
mov ebp, dword [ebx + 0x30]
mov esi, dword [ebx + 0x34]
jmp 0x478478
mov ebp, dword [ebx + 0x10]
xor esi, esi
test esi, esi
ja 0x4789c6
jb 0x47848b
cmp ebp, 0xffffffff
jae 0x4789c6
push ebp
call dword [sym.imp.MSVCRT.dll_malloc]
mov edi, eax
add esp, 4
test edi, edi
mov dword [esp + 0x2c], edi
je 0x4789e1
cmp byte [ebx + 8], 1
jne 0x478558
mov ecx, dword [esp + 0x158]
push esi
push ebp
push edi
push 0
push 0
push ebx
push ecx
call fcn.004776f0
add esp, 0x1c
cmp eax, 1
jne 0x4787f7
mov esi, dword [esp + 0x2c]
add ebp, esi
mov dword [esp + 0x28], esi
mov eax, dword [esi]
mov dword [esp + 0x3c], ebp
cmp eax, 0xffffffff
je 0x4787f7
cmp esi, dword [esp + 0x3c]
jae 0x4787f7
cmp dword [esi], 0x80
jne 0x4787da
cmp word [esi + 0x18], 0
je 0x4787da
mov ecx, dword [esi + 0x10]
mov edx, dword [esi + 0x14]
mov edi, dword [esp + 0x164]
lea eax, [esp + 0x14]
and edx, 0xffff
mov dword [esp + 0x14], ecx
push eax
mov ecx, edi
mov dword [esp + 0x1c], edx
call fcn.0047a3b0
mov ecx, dword [edi + 4]
mov ebp, dword [esp + 0x18]
cmp eax, ecx
mov dword [esp + 0x30], eax
je 0x47859f
mov edx, dword [eax + 0x14]
add eax, 0x10
cmp ebp, edx
jb 0x47859f
ja 0x478552
mov edx, dword [esp + 0x14]
cmp edx, dword [eax]
jb 0x47859f
lea eax, [esp + 0x30]
jmp 0x4785a7
mov ecx, dword [ebx + 0x10]
xor eax, eax
cmp esi, eax
jb 0x478582
ja 0x478567
cmp ebp, ecx
jbe 0x478582
xor esi, esi
mov edx, ecx
mov si, word [ebx + 0x14]
add esi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x4784ce
mov ecx, ebp
xor esi, esi
mov si, word [ebx + 0x14]
mov eax, ecx
add esi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x4784ce
mov dword [esp + 0x34], ecx
lea eax, [esp + 0x34]
cmp ecx, dword [eax]
jne 0x4787da
cmp dword [edi + 0xc], 0x10000
ja 0x4787f7
mov esi, dword [ecx + 4]
mov edx, dword [0x5860b8]
cmp esi, edx
mov edi, ecx
mov al, 1
je 0x4785f0
mov eax, dword [esi + 0x14]
mov edi, esi
cmp ebp, eax
ja 0x4785e7
jb 0x4785e1
mov eax, dword [esp + 0x14]
cmp eax, dword [esi + 0x10]
jae 0x4785e7
mov esi, dword [esi]
mov al, 1
jmp 0x4785ec
mov esi, dword [esi + 8]
xor al, al
cmp esi, edx
jne 0x4785cd
mov edx, dword [esp + 0x164]
cmp byte [edx + 8], 0
je 0x47860d
lea ecx, [esp + 0x14]
lea eax, [esp + 0x44]
push ecx
push edi
push esi
push eax
mov ecx, edx
jmp 0x47862c
test al, al
mov dword [esp + 0x1c], edi
je 0x47864b
cmp edi, dword [ecx]
jne 0x47863e
mov ecx, dword [esp + 0x164]
lea edx, [esp + 0x14]
push edx
push edi
lea eax, [esp + 0x50]
push esi
push eax
call fcn.0047a0d0
mov ecx, dword [eax]
mov byte [esp + 0x24], 1
mov dword [esp + 0x20], ecx
jmp 0x4786a2
lea ecx, [esp + 0x1c]
call fcn.0047a4f0
mov ebp, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov ecx, dword [edx + 0x14]
lea eax, [edx + 0x10]
cmp ecx, ebp
ja 0x47868a
jb 0x478665
mov edx, dword [eax]
mov eax, dword [esp + 0x14]
cmp edx, eax
jae 0x47868a
lea eax, [esp + 0x14]
lea ecx, [esp + 0x40]
push eax
push edi
push esi
push ecx
mov ecx, dword [esp + 0x174]
call fcn.0047a0d0
mov edx, dword [eax]
mov byte [esp + 0x24], 1
mov dword [esp + 0x20], edx
jmp 0x4786a2
lea eax, [esp + 0x13]
lea ecx, [esp + 0x1c]
push eax
push ecx
lea ecx, [esp + 0x28]
mov byte [esp + 0x1b], 0
call fcn.00479bd0
mov edx, dword [esp + 0x158]
mov eax, dword [edx + 0x10]
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x4787f7
mov ecx, dword [esp + 0x158]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
xor esi, esi
mov edi, dword [ecx + 0x10]
push edx
push eax
push esi
push edi
call fcn.004a6a10
mov ecx, edi
mov edi, dword [esp + 0x158]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], edx
mov edi, dword [edi + 0x24]
cmp byte [edi + 8], 1
jne 0x478754
push esi
push ecx
mov ecx, dword [esp + 0x160]
push ebp
push edx
push eax
push edi
push ecx
call fcn.004776f0
add esp, 0x1c
cmp eax, 1
jne 0x4787cc
mov esi, dword [esp + 0x158]
push ebp
push esi
call fcn.00477aa0
add esp, 8
cmp eax, 1
jne 0x4787cc
mov ecx, dword [esp + 0x164]
mov edx, dword [esp + 0x160]
xor eax, eax
push ecx
mov ax, word [ebp + 0x14]
push edx
add eax, ebp
push eax
push esi
call fcn.00478420
add esp, 0x10
jmp 0x4787cc
xor ebx, ebx
cmp edx, ebx
ja 0x4787c5
jb 0x478761
cmp eax, dword [edi + 0x10]
ja 0x4787c5
mov ebx, ecx
add ebx, eax
adc esi, edx
xor edx, edx
cmp esi, edx
jb 0x47879f
ja 0x478774
cmp ebx, dword [edi + 0x10]
jbe 0x47879f
mov ecx, dword [edi + 0x10]
xor esi, esi
mov si, word [edi + 0x14]
sub ecx, eax
add esi, eax
mov edx, ecx
add esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ebx, dword [esp + 0x15c]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x478716
xor esi, esi
mov ebx, dword [esp + 0x15c]
mov si, word [edi + 0x14]
add esi, eax
mov eax, ecx
add esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x478716
mov ebx, dword [esp + 0x15c]
push ebp
call dword [sym.imp.MSVCRT.dll_free]
mov esi, dword [esp + 0x2c]
add esp, 4
mov ax, word [esi + 4]
test ax, ax
je 0x4787f7
and eax, 0xffff
add esi, eax
mov dword [esp + 0x28], esi
cmp dword [esi], 0xffffffff
jne 0x4784e7
mov ecx, dword [esp + 0x2c]
push ecx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
jmp 0x4789c6
cmp eax, 0x80
jne 0x4789c6
mov al, byte [ebx + 9]
test al, al
je 0x4789c6
mov ecx, dword [esp + 0x160]
xor edx, edx
and eax, 0xff
mov dl, byte [ecx + 0x40]
add edx, eax
lea edx, [edx + edx + 0x10]
push edx
call dword [sym.imp.MSVCRT.dll_malloc]
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x4789c6
mov eax, dword [esp + 0x160]
mov cl, byte [eax + 0x40]
cmp cl, 1
ja 0x478894
cmp word [eax + 0x42], 0x2e
jne 0x478894
mov cx, word [0x5134c0]
xor esi, esi
mov word [ebp], cx
mov si, word [ebx + 0xa]
xor ecx, ecx
add esi, ebx
mov cl, byte [ebx + 9]
lea edi, [ebp + 2]
shl ecx, 1
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor ecx, ecx
mov cl, byte [ebx + 9]
inc ecx
jmp 0x4788f4
and ecx, 0xff
lea esi, [eax + 0x42]
shl ecx, 1
mov edx, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dx, word [0x5134c0]
xor ecx, ecx
mov cl, byte [eax + 0x40]
xor esi, esi
mov word [ebp + ecx*2], dx
mov si, word [ebx + 0xa]
xor ecx, ecx
xor edx, edx
mov cl, byte [ebx + 9]
mov dl, byte [eax + 0x40]
shl ecx, 1
lea edi, [ebp + edx*2 + 2]
mov edx, ecx
add esi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor ecx, ecx
xor edx, edx
mov cl, byte [eax + 0x40]
mov dl, byte [ebx + 9]
lea ecx, [ecx + edx + 1]
mov edx, dword [eax + 8]
mov dword [esp + 0x50], ecx
mov dword [esp + 0x54], edx
mov edx, dword [eax + 0xc]
mov dword [esp + 0x58], edx
mov edx, dword [eax + 0x18]
mov dword [esp + 0x5c], edx
mov edx, dword [eax + 0x1c]
mov dword [esp + 0x60], edx
mov edx, dword [eax + 0x28]
mov eax, dword [eax + 0x2c]
mov dword [esp + 0x64], edx
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x158]
mov ecx, 1
mov dword [esp + 0x4c], ebp
mov edx, dword [eax + 0x90]
mov dword [esp + 0x78], ecx
mov dword [esp + 0x74], edx
xor edx, edx
mov dword [esp + 0x80], edx
mov dword [esp + 0x84], ecx
mov cl, byte [ebx + 8]
test cl, cl
jne 0x47898e
mov eax, dword [eax + 8]
mov ecx, dword [ebx + 0x10]
xor edi, edi
xor ebx, ebx
lea esi, [eax - 1]
add eax, ecx
not esi
adc ebx, edx
and esi, eax
mov eax, dword [esp + 0x158]
and edi, ebx
mov ebx, dword [esp + 0x15c]
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x70], edx
mov dword [esp + 0x64], esi
mov dword [esp + 0x68], edi
jmp 0x4789aa
mov ecx, dword [ebx + 0x30]
mov dword [esp + 0x6c], ecx
mov edx, dword [ebx + 0x34]
mov dword [esp + 0x70], edx
mov ecx, dword [ebx + 0x28]
mov dword [esp + 0x64], ecx
mov edx, dword [ebx + 0x2c]
mov dword [esp + 0x68], edx
mov ecx, dword [eax + 0x8c]
lea edx, [esp + 0x4c]
push ecx
push edx
call dword [eax + 0x88]
push ebp
call dword [sym.imp.MSVCRT.dll_free]
add esp, 0xc
mov eax, dword [ebx + 4]
test eax, eax
je 0x4789e1
add ebx, eax
mov dword [esp + 0x15c], ebx
mov eax, dword [ebx]
cmp eax, 0xffffffff
jne 0x478450
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x144
ret