Function at 0x474df0
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 0x4753b1
jmp 0x474e24
mov ecx, dword [esp + 0x38]
cmp ebx, ecx
jae 0x4753b1
cmp eax, 0x20
jne 0x4751da
cmp byte [ebx + 8], 1
jne 0x474e43
mov ebp, dword [ebx + 0x30]
mov esi, dword [ebx + 0x34]
jmp 0x474e48
mov ebp, dword [ebx + 0x10]
xor esi, esi
test esi, esi
ja 0x475396
jb 0x474e5b
cmp ebp, 0xffffffff
jae 0x475396
push ebp
call dword [sym.imp.MSVCRT.dll_malloc]
mov edi, eax
add esp, 4
test edi, edi
mov dword [esp + 0x2c], edi
je 0x4753b1
cmp byte [ebx + 8], 1
jne 0x474f28
mov ecx, dword [esp + 0x158]
push esi
push ebp
push edi
push 0
push 0
push ebx
push ecx
call fcn.004740c0
add esp, 0x1c
cmp eax, 1
jne 0x4751c7
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 0x4751c7
cmp esi, dword [esp + 0x3c]
jae 0x4751c7
cmp dword [esi], 0x80
jne 0x4751aa
cmp word [esi + 0x18], 0
je 0x4751aa
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.00476d80
mov ecx, dword [edi + 4]
mov ebp, dword [esp + 0x18]
cmp eax, ecx
mov dword [esp + 0x30], eax
je 0x474f6f
mov edx, dword [eax + 0x14]
add eax, 0x10
cmp ebp, edx
jb 0x474f6f
ja 0x474f22
mov edx, dword [esp + 0x14]
cmp edx, dword [eax]
jb 0x474f6f
lea eax, [esp + 0x30]
jmp 0x474f77
mov ecx, dword [ebx + 0x10]
xor eax, eax
cmp esi, eax
jb 0x474f52
ja 0x474f37
cmp ebp, ecx
jbe 0x474f52
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 0x474e9e
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 0x474e9e
mov dword [esp + 0x34], ecx
lea eax, [esp + 0x34]
cmp ecx, dword [eax]
jne 0x4751aa
cmp dword [edi + 0xc], 0x10000
ja 0x4751c7
mov esi, dword [ecx + 4]
mov edx, dword [0x580300]
cmp esi, edx
mov edi, ecx
mov al, 1
je 0x474fc0
mov eax, dword [esi + 0x14]
mov edi, esi
cmp ebp, eax
ja 0x474fb7
jb 0x474fb1
mov eax, dword [esp + 0x14]
cmp eax, dword [esi + 0x10]
jae 0x474fb7
mov esi, dword [esi]
mov al, 1
jmp 0x474fbc
mov esi, dword [esi + 8]
xor al, al
cmp esi, edx
jne 0x474f9d
mov edx, dword [esp + 0x164]
cmp byte [edx + 8], 0
je 0x474fdd
lea ecx, [esp + 0x14]
lea eax, [esp + 0x44]
push ecx
push edi
push esi
push eax
mov ecx, edx
jmp 0x474ffc
test al, al
mov dword [esp + 0x1c], edi
je 0x47501b
cmp edi, dword [ecx]
jne 0x47500e
mov ecx, dword [esp + 0x164]
lea edx, [esp + 0x14]
push edx
push edi
lea eax, [esp + 0x50]
push esi
push eax
call fcn.00476aa0
mov ecx, dword [eax]
mov byte [esp + 0x24], 1
mov dword [esp + 0x20], ecx
jmp 0x475072
lea ecx, [esp + 0x1c]
call fcn.00476ec0
mov ebp, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov ecx, dword [edx + 0x14]
lea eax, [edx + 0x10]
cmp ecx, ebp
ja 0x47505a
jb 0x475035
mov edx, dword [eax]
mov eax, dword [esp + 0x14]
cmp edx, eax
jae 0x47505a
lea eax, [esp + 0x14]
lea ecx, [esp + 0x40]
push eax
push edi
push esi
push ecx
mov ecx, dword [esp + 0x174]
call fcn.00476aa0
mov edx, dword [eax]
mov byte [esp + 0x24], 1
mov dword [esp + 0x20], edx
jmp 0x475072
lea eax, [esp + 0x13]
lea ecx, [esp + 0x1c]
push eax
push ecx
lea ecx, [esp + 0x28]
mov byte [esp + 0x1b], 0
call fcn.004765a0
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 0x4751c7
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.004a18b0
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 0x475124
push esi
push ecx
mov ecx, dword [esp + 0x160]
push ebp
push edx
push eax
push edi
push ecx
call fcn.004740c0
add esp, 0x1c
cmp eax, 1
jne 0x47519c
mov esi, dword [esp + 0x158]
push ebp
push esi
call fcn.00474470
add esp, 8
cmp eax, 1
jne 0x47519c
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.00474df0
add esp, 0x10
jmp 0x47519c
xor ebx, ebx
cmp edx, ebx
ja 0x475195
jb 0x475131
cmp eax, dword [edi + 0x10]
ja 0x475195
mov ebx, ecx
add ebx, eax
adc esi, edx
xor edx, edx
cmp esi, edx
jb 0x47516f
ja 0x475144
cmp ebx, dword [edi + 0x10]
jbe 0x47516f
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 0x4750e6
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 0x4750e6
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 0x4751c7
and eax, 0xffff
add esi, eax
mov dword [esp + 0x28], esi
cmp dword [esi], 0xffffffff
jne 0x474eb7
mov ecx, dword [esp + 0x2c]
push ecx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
jmp 0x475396
cmp eax, 0x80
jne 0x475396
mov al, byte [ebx + 9]
test al, al
je 0x475396
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 0x475396
mov eax, dword [esp + 0x160]
mov cl, byte [eax + 0x40]
cmp cl, 1
ja 0x475264
cmp word [eax + 0x42], 0x2e
jne 0x475264
mov cx, word [0x50d7c0]
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 0x4752c4
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 [0x50d7c0]
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 0x47535e
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 0x47537a
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 0x4753b1
add ebx, eax
mov dword [esp + 0x15c], ebx
mov eax, dword [ebx]
cmp eax, 0xffffffff
jne 0x474e20
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x144
ret