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

Disassembly:
sub esp, 0x8c
mov eax, dword [0x5153e8]
xor eax, esp
mov dword [esp + 0x88], eax
mov edx, dword [esp + 0x9c]
xor eax, eax
push ebx
push ebp
mov ebp, dword [esp + 0xac]
push esi
mov esi, dword [esp + 0xa0]
push edi
mov edi, dword [esp + 0xb0]
mov dword [esp + 0x40], esi
mov dword [esp + 0x3c], edx
mov dword [esp + 0x48], edi
mov dword [esp + 0x34], ebp
xor ecx, ecx
mov word [esp + eax + 0x58], cx
add eax, 2
cmp eax, 0x1e
jbe 0x475d56
mov ebx, dword [esp + 0xa8]
test ebx, ebx
je 0x475d7e
movzx eax, word [esi + ecx*2]
inc ecx
inc word [esp + eax*2 + 0x58]
cmp ecx, ebx
jb 0x475d70
mov ecx, dword [edi]
lea eax, [esp + 0x72]
mov edi, 0xf
nop dword [eax]
cmp word [eax + 4], 0
jne 0x475dcf
cmp word [eax + 2], 0
jne 0x475dce
cmp word [eax], 0
jne 0x475dc9
cmp word [eax - 2], 0
jne 0x475dc4
cmp word [eax - 4], 0
jne 0x475dbf
sub edi, 5
sub eax, 0xa
cmp edi, 1
jae 0x475d90
jmp 0x475dcf
sub edi, 4
jmp 0x475dcf
sub edi, 3
jmp 0x475dcf
sub edi, 2
jmp 0x475dcf
dec edi
cmp ecx, edi
mov eax, edi
cmovbe eax, ecx
test edi, edi
jne 0x475e05
mov ecx, dword [edx]
mov dword [esp + 0x10], 0x140
mov eax, dword [esp + 0x10]
mov dword [ecx], eax
add dword [edx], 4
mov ecx, dword [edx]
mov dword [ecx], eax
mov ecx, dword [esp + 0x48]
add dword [edx], 4
xor eax, eax
mov dword [ecx], 1
jmp 0x476164
mov edx, 1
mov dword [esp + 0x14], edx
cmp edi, edx
jbe 0x475e23
cmp word [esp + edx*2 + 0x58], 0
jne 0x475e1f
inc edx
cmp edx, edi
jb 0x475e12
mov dword [esp + 0x14], edx
cmp eax, edx
mov ecx, edx
mov esi, 1
cmovae ecx, eax
mov dword [esp + 0x28], ecx
mov ecx, esi
movzx eax, word [esp + ecx*2 + 0x58]
add esi, esi
sub esi, eax
js 0x476161
inc ecx
cmp ecx, 0xf
jbe 0x475e35
test esi, esi
mov esi, dword [esp + 0xa0]
jle 0x475e66
test esi, esi
je 0x476161
cmp edi, 1
jne 0x476161
xor eax, eax
mov ecx, 2
mov word [esp + 0x7a], ax
nop dword [eax]
nop word [eax + eax]
mov ax, word [esp + ecx + 0x58]
add ax, word [esp + ecx + 0x78]
mov word [esp + ecx + 0x7a], ax
add ecx, 2
cmp ecx, 0x1e
jb 0x475e80
xor ecx, ecx
test ebx, ebx
je 0x475ec6
mov edx, dword [esp + 0x40]
movzx eax, word [edx + ecx*2]
test ax, ax
je 0x475ebd
movzx eax, word [esp + eax*2 + 0x78]
mov word [ebp + eax*2], cx
movzx eax, word [edx + ecx*2]
inc word [esp + eax*2 + 0x78]
inc ecx
cmp ecx, ebx
jb 0x475ea1
mov edx, dword [esp + 0x14]
mov eax, esi
sub eax, 0
je 0x475f06
sub eax, 1
je 0x475eec
mov dword [esp + 0x30], 0x4ea230
mov dword [esp + 0x2c], 0x4ea270
mov dword [esp + 0x20], 0
jmp 0x475f16
mov dword [esp + 0x30], 0x4ea1b0
mov dword [esp + 0x2c], 0x4ea1f0
mov dword [esp + 0x20], 0x101
jmp 0x475f16
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], ebp
mov dword [esp + 0x20], 0x14
mov ecx, dword [esp + 0x3c]
mov ebx, 1
xor ebp, ebp
mov dword [esp + 0x44], 0xffffffff
mov dword [esp + 0x18], ebp
mov eax, dword [ecx]
mov ecx, dword [esp + 0x28]
shl ebx, cl
mov dword [esp + 0x1c], eax
mov eax, ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x38], eax
lea ecx, [eax - 1]
mov dword [esp + 0x4c], ecx
cmp esi, 1
jne 0x475f56
cmp eax, 0x354
jmp 0x475f60
cmp esi, 2
jne 0x475f66
cmp eax, 0x250
ja 0x47615a
mov al, dl
sub al, byte [esp + 0x18]
mov byte [esp + 0x11], al
mov eax, dword [esp + 0x34]
movzx esi, word [eax]
mov ecx, esi
lea eax, [ecx + 1]
cmp eax, dword [esp + 0x20]
jae 0x475f8e
mov byte [esp + 0x10], 0
mov word [esp + 0x12], si
jmp 0x475fb9
mov eax, dword [esp + 0x20]
cmp ecx, eax
jb 0x475fad
sub ecx, eax
mov eax, dword [esp + 0x2c]
mov al, byte [eax + ecx*2]
mov byte [esp + 0x10], al
mov eax, dword [esp + 0x30]
mov ax, word [eax + ecx*2]
jmp 0x475fb4
mov byte [esp + 0x10], 0x60
xor eax, eax
mov word [esp + 0x12], ax
mov ecx, edx
mov esi, 1
sub ecx, dword [esp + 0x18]
mov edx, ebx
shl esi, cl
mov eax, ebp
mov ecx, dword [esp + 0x18]
shr eax, cl
mov ecx, dword [esp + 0x1c]
add eax, edx
mov dword [esp + 0x50], edx
lea ebx, [esi*4]
lea ecx, [ecx + eax*4]
mov eax, dword [esp + 0x10]
sub ecx, ebx
mov dword [ecx], eax
sub edx, esi
jne 0x475fe8
mov ecx, dword [esp + 0x14]
mov edx, 1
dec ecx
shl edx, cl
test ebp, edx
je 0x476006
shr edx, 1
test ebp, edx
jne 0x476000
test edx, edx
je 0x476013
lea eax, [edx - 1]
and ebp, eax
add ebp, edx
jmp 0x476015
xor ebp, ebp
mov edx, dword [esp + 0x14]
mov ecx, 0xffff
mov eax, dword [esp + 0x34]
add eax, 2
mov dword [esp + 0x34], eax
add word [esp + edx*2 + 0x58], cx
jne 0x476047
cmp edx, edi
je 0x476124
movzx eax, word [eax]
mov ecx, dword [esp + 0x40]
movzx edx, word [ecx + eax*2]
mov dword [esp + 0x14], edx
mov ecx, dword [esp + 0x28]
mov ebx, dword [esp + 0x24]
cmp edx, ecx
jbe 0x475f66
mov esi, dword [esp + 0x4c]
and esi, ebp
mov dword [esp + 0x54], esi
cmp esi, dword [esp + 0x44]
je 0x475f66
mov eax, dword [esp + 0x18]
test eax, eax
mov ebx, dword [esp + 0x1c]
cmove eax, ecx
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x18], eax
lea ebx, [ebx + ecx*4]
mov dword [esp + 0x1c], ebx
mov ebx, edx
sub ebx, eax
mov eax, 1
mov ecx, ebx
shl eax, cl
cmp edx, edi
jae 0x4760bc
mov esi, edx
lea edx, [esp + edx*2 + 0x58]
nop
movzx ecx, word [edx]
sub eax, ecx
test eax, eax
jle 0x4760b4
inc esi
inc ebx
add edx, 2
add eax, eax
cmp esi, edi
jb 0x4760a0
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x54]
mov ecx, ebx
mov eax, 1
shl eax, cl
mov ecx, dword [esp + 0x38]
add ecx, eax
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0xa0]
mov dword [esp + 0x38], ecx
cmp eax, 1
jne 0x4760e7
cmp ecx, 0x354
jmp 0x4760f2
cmp eax, 2
jne 0x4760f4
cmp ecx, 0x250
ja 0x47615a
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x44], esi
mov eax, dword [ecx]
mov byte [eax + esi*4], bl
mov eax, dword [ecx]
mov ebx, dword [esp + 0x28]
mov byte [eax + esi*4 + 1], bl
mov ecx, dword [ecx]
mov eax, dword [esp + 0x1c]
mov ebx, dword [esp + 0x24]
sub eax, ecx
sar eax, 2
mov word [ecx + esi*4 + 2], ax
jmp 0x475f66
test ebp, ebp
je 0x47613f
mov ecx, dword [esp + 0x1c]
xor eax, eax
mov byte [esp + 0x10], 0x40
mov word [esp + 0x12], ax
mov eax, dword [esp + 0x10]
mov dword [ecx + ebp*4], eax
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
shl eax, 2
add dword [ecx], eax
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x28]
mov dword [ecx], eax
xor eax, eax
jmp 0x476164
mov eax, 1
jmp 0x476164
or eax, 0xffffffff
mov ecx, dword [esp + 0x98]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0049212c
add esp, 0x8c
ret