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

Disassembly:
sub esp, 0x50
mov eax, dword [esp + 0x64]
push ebx
mov ebx, dword [eax + 0x24]
test ebx, ebx
push ebp
mov ebp, dword [esp + 0x5c]
push esi
mov esi, dword [ebp]
push edi
mov dword [esp + 0x10], esi
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x64], ebx
jne 0x4768b8
mov eax, dword [esp + 0x88]
test eax, eax
je 0x476892
mov ecx, dword [esp + 0x28]
or dword [eax], ecx
mov eax, dword [esp + 0x8c]
test eax, eax
je 0x4768a3
mov edx, dword [esp + 0x24]
or dword [eax], edx
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x50
ret
mov ebx, dword [esp + 0x64]
mov esi, dword [esp + 0x10]
movzx edx, byte [ebx + 8]
mov ecx, dword [esp + 0x68]
cmp edx, ecx
jne 0x476af0
movzx eax, byte [ebx + 9]
cmp eax, dword [esp + 0x70]
jne 0x476af0
mov eax, dword [ebx + 0x1c]
cmp eax, dword [ebx + 0x20]
je 0x4768ea
mov edx, dword [esi + 8]
cmp eax, dword [edx + 0x2c]
jne 0x476af0
cmp ecx, 0x69
jne 0x47690b
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x47690b
push eax
mov eax, dword [esp + 0x70]
call 0x4329a0
add esp, 4
test eax, eax
je 0x476af0
mov eax, dword [ebp + 0x194]
test eax, eax
je 0x476925
cmp ebx, dword [eax + 0x1c]
je 0x476af0
mov eax, dword [eax + 0x20]
test eax, eax
jne 0x476915
mov eax, dword [ebx]
push eax
push 0x7455f8
call fcn.0043deb0
mov esi, dword [ebp + 0xc]
push 0
push 0
mov edi, eax
push 0
push 0x16
mov dword [esp + 0x2c], edi
call fcn.00438870
mov ecx, dword [esi + 0x14]
mov edx, dword [esi]
add esp, 0x18
test ecx, ecx
je 0x476998
cmp byte [edx + 0x1e], 0
jne 0x476998
test eax, eax
jge 0x476966
mov eax, dword [esi + 0xc]
sub eax, 1
js 0x4769a4
lea eax, [eax + eax*4]
lea esi, [ecx + eax*4]
movsx eax, byte [esi + 1]
mov ecx, dword [esi + 0x10]
mov edi, edx
call fcn.00438bf0
mov eax, dword [esp + 0x14]
xor ecx, ecx
cmp eax, ecx
mov dword [esi + 0x10], ecx
jne 0x47698f
mov dword [esi + 0x10], ecx
mov byte [esi + 1], cl
jmp 0x4769a4
mov dword [esi + 0x10], eax
mov byte [esi + 1], 0xff
jmp 0x4769a4
mov ecx, edi
or eax, 0xffffffff
mov edi, edx
call fcn.00438bf0
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x7c]
mov edi, dword [ebp + 0x198]
xor eax, eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x74]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ecx
mov ecx, dword [ebp + 0x194]
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x84]
lea eax, [esp + 0x18]
mov dword [ebp + 0x194], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x30], edx
mov ecx, dword [ebx]
mov dword [esp + 0x3c], ebp
mov dword [ebp + 0x198], ecx
call fcn.004388f0
mov edx, dword [ebx + 0xc]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x10]
push edx
push eax
call fcn.00444f50
mov esi, dword [esp + 0x18]
add esp, 8
cmp byte [esi + 0x1e], 0
mov ebx, eax
jne 0x476b08
lea esi, [esp + 0x3c]
call fcn.0044c2d0
test eax, eax
jne 0x476b04
mov ecx, dword [esp + 0x14]
push 8
push ecx
push ebx
push ebp
call fcn.0044ce50
add esp, 0x10
test ebx, ebx
je 0x476aa7
mov esi, dword [esp + 0x10]
mov eax, ebx
mov ecx, esi
call fcn.00439600
cmp ebx, dword [esi + 0xf0]
jb 0x476a9e
cmp ebx, dword [esi + 0xf4]
jae 0x476a9e
mov edx, dword [esi + 0xec]
mov dword [ebx], edx
add dword [esi + 0xe4], 0xffffffff
mov dword [esi + 0xec], ebx
jmp 0x476aa7
push ebx
call fcn.0042aff0
add esp, 4
mov eax, dword [esp + 0x80]
mov ecx, dword [esp + 0x64]
mov edx, dword [ecx + 0x24]
push eax
push edx
push ebp
call fcn.00476640
mov eax, dword [esp + 0x44]
mov ebx, dword [esp + 0x70]
mov dword [ebp + 0x194], eax
mov dword [ebp + 0x198], edi
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + 0x20]
add esp, 0xc
test eax, eax
je 0x476af0
mov edx, dword [esp + 0x14]
mov ecx, dword [ecx + 0xc]
lea edx, [edx*4 + 4]
sub eax, edx
mov dword [eax], ecx
mov ebx, dword [ebx + 0x28]
test ebx, ebx
mov dword [esp + 0x64], ebx
jne 0x4768b0
jmp 0x476881
mov esi, dword [esp + 0x10]
test ebx, ebx
mov edx, dword [esp + 0x38]
mov dword [ebp + 0x194], edx
je 0x476b5a
mov eax, ebx
mov ecx, esi
call fcn.00439600
cmp ebx, dword [esi + 0xf0]
jb 0x476b51
cmp ebx, dword [esi + 0xf4]
jae 0x476b51
mov eax, dword [esi + 0xec]
mov dword [ebx], eax
add dword [esi + 0xe4], 0xffffffff
pop edi
mov dword [esi + 0xec], ebx
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x50
ret
push ebx
call fcn.0042aff0
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x50
ret