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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3c
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 8]
mov ebx, ecx
mov ecx, dword [ebp + 0x10]
xor esi, esi
cmp eax, 5
push edi
mov dword [esp + 0x2c], ecx
mov dword [esp + 0xc], esi
je 0x4ba1c9
push esi
lea edx, [esp + 0x2c]
push edx
lea ecx, [ebx + 0x15c]
call fcn.00478780
mov esi, eax
test esi, esi
mov dword [esp + 0xc], esi
je 0x4ba1c9
mov eax, dword [esi + 0x18]
cmp dword [eax + 0x78], 9
jne 0x4ba1c3
mov ecx, dword [esi + 4]
mov edx, dword [ecx + 0x18]
mov eax, dword [edx + 0x128]
test ah, 4
jne case.default.0x4ba1fb
mov dword [esp + 0x14], esi
jmp 0x4ba1d3
mov eax, dword [ebx + 0x23c]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x14]
xor edi, edi
test eax, eax
mov dword [esp + 0x10], edi
je 0x4ba1ee
mov ecx, eax
call fcn.0048cb70
mov edi, eax
mov dword [esp + 0x10], edi
mov eax, dword [ebp + 8]
dec eax
cmp eax, 4
ja case.default.0x4ba1fb
jmp dword [eax*4 + 0x4ba8b8]
call dword [0x5f6554]
mov esi, eax
mov eax, dword [ebx + 0x8f4]
and esi, 0x7fffffff
test eax, eax
je 0x4ba242
mov eax, dword [ebx + 0x8f0]
test eax, eax
je 0x4ba242
call dword [0x5f64dc]
sub esi, dword [ebx + 0x8f4]
cmp esi, eax
jle 0x4ba242
xor eax, eax
mov dword [ebx + 0x8f4], eax
mov dword [ebx + 0x8f0], eax
cmp dword [ebp + 8], 1
jne 0x4ba285
test edi, edi
je 0x4ba27b
fild dword [ebp + 0x10]
mov ecx, dword [edi + 8]
mov edx, dword [ecx + 0x18]
mov eax, dword [edx + 0x10]
mov ecx, dword [eax + 0x400]
push 0
push 0
sub esp, 0x10
fstp qword [esp + 8]
fild dword [ebp + 0xc]
fstp qword [esp]
push 0
push 1
push ecx
mov ecx, edi
call fcn.00538a40
mov dword [ebx + 0x8f4], 0
mov ecx, dword [ebx + 0x8e8]
xor esi, esi
test ecx, ecx
mov dword [esp + 0x14], esi
je 0x4ba2a0
call fcn.0048cb70
mov esi, eax
mov dword [esp + 0x14], esi
xor eax, eax
cmp edi, eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
je 0x4ba2be
lea edx, [esp + 0x3c]
push edx
mov ecx, edi
call fcn.00536f90
xor ecx, ecx
xor eax, eax
test esi, esi
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], ecx
je 0x4ba2fa
mov ecx, esi
call fcn.00536c50
test al, al
je 0x4ba2f2
lea eax, [esp + 0x30]
push eax
mov ecx, esi
call fcn.00536f90
mov eax, dword [esp + 0x30]
jmp 0x4ba398
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
mov edx, dword [ebx + 0x8f8]
test edx, edx
je 0x4ba398
xor edi, edi
test edx, edx
jbe 0x4ba365
jmp 0x4ba314
mov ecx, dword [esp + 0x34]
mov edx, dword [ebx + 0x900]
mov esi, dword [edx + edi*4]
lea edx, [eax + 1]
cmp edx, ecx
jbe 0x4ba34a
test ecx, ecx
je 0x4ba331
lea eax, [ecx + ecx]
mov dword [esp + 0x34], eax
jmp 0x4ba339
mov dword [esp + 0x34], 0x80
lea ecx, [esp + 0x30]
call fcn.00401400
test al, al
mov eax, dword [esp + 0x30]
je 0x4ba35a
mov ecx, dword [esp + 0x38]
mov dword [ecx + eax*4], esi
mov eax, dword [esp + 0x30]
inc eax
mov dword [esp + 0x30], eax
mov ecx, dword [ebx + 0x8f8]
inc edi
cmp edi, ecx
jb 0x4ba310
mov ecx, dword [ebx + 0x900]
xor esi, esi
cmp ecx, esi
je 0x4ba384
push ecx
call fcn.005dd350
mov eax, dword [esp + 0x34]
add esp, 4
mov dword [ebx + 0x900], esi
mov edi, dword [esp + 0x10]
mov dword [ebx + 0x8fc], esi
mov dword [ebx + 0x8f8], esi
mov esi, dword [esp + 0x14]
mov ecx, dword [esp + 0x3c]
test ecx, ecx
je 0x4ba3d5
test eax, eax
je 0x4ba3ce
test eax, eax
je 0x4ba3de
mov edx, dword [esp + 0x44]
mov ecx, dword [edx + ecx*4 - 4]
mov edx, dword [esp + 0x38]
cmp ecx, dword [edx + eax*4 - 4]
jne 0x4ba3de
mov ecx, dword [esp + 0x3c]
dec ecx
dec eax
test ecx, ecx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x30], eax
jne 0x4ba3a4
jmp 0x4ba3de
dec ecx
mov dword [esp + 0x3c], ecx
jmp 0x4ba3de
test eax, eax
je 0x4ba3de
dec eax
mov dword [esp + 0x30], eax
mov ecx, dword [esp + 0xc]
test ecx, ecx
je 0x4ba60e
mov eax, dword [ebx + 0x8e8]
test eax, eax
je 0x4ba575
cmp ecx, eax
je 0x4ba6be
test esi, esi
je 0x4ba4bd
fild dword [ebp + 0x10]
mov edi, dword [esp + 0x14]
mov eax, dword [edi + 8]
mov ecx, dword [eax + 0x18]
mov edx, dword [ecx + 0x10]
fstp qword [esp + 0x18]
fild dword [ebp + 0xc]
mov ecx, dword [esp + 0xc]
mov esi, dword [edx + 0x404]
push 0
fstp qword [esp + 0x24]
call fcn.0048cb70
fld qword [esp + 0x1c]
push eax
sub esp, 0x10
fstp qword [esp + 8]
mov ecx, edi
fld qword [esp + 0x38]
fstp qword [esp]
push 0
push 1
push esi
call fcn.00538a40
mov eax, dword [esp + 0x30]
xor edi, edi
test eax, eax
mov dword [esp + 0x14], edi
jbe 0x4ba4bd
mov eax, dword [esp + 0x38]
mov ecx, dword [eax + edi*4]
call fcn.0048cb70
mov esi, eax
test esi, esi
je 0x4ba4b0
mov ecx, dword [esi + 8]
mov edx, dword [ecx + 0x18]
mov eax, dword [edx + 0x10]
mov ecx, dword [esp + 0xc]
mov edi, dword [eax + 0x440]
push 0
call fcn.0048cb70
fld qword [esp + 0x1c]
push eax
sub esp, 0x10
fstp qword [esp + 8]
mov ecx, esi
fld qword [esp + 0x38]
fstp qword [esp]
push 0
push 0
push edi
call fcn.00538a40
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x30]
inc edi
cmp edi, eax
mov dword [esp + 0x14], edi
jb 0x4ba461
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4ba566
mov eax, dword [esp + 0x3c]
dec eax
mov dword [esp + 0x14], eax
js 0x4ba529
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x14]
mov ecx, dword [ecx + edx*4]
call fcn.0048cb70
mov esi, eax
test esi, esi
je 0x4ba523
mov eax, dword [esi + 8]
mov ecx, dword [eax + 0x18]
mov edx, dword [ecx + 0x10]
mov ecx, dword [ebx + 0x8e8]
mov edi, dword [edx + 0x444]
push 0
call fcn.0048cb70
fild dword [ebp + 0x10]
push eax
sub esp, 0x10
fstp qword [esp + 8]
mov ecx, esi
fild dword [ebp + 0xc]
fstp qword [esp]
push 0
push 0
push edi
call fcn.00538a40
dec dword [esp + 0x14]
jns 0x4ba4d4
mov esi, dword [esp + 0x10]
mov eax, dword [esi + 8]
mov ecx, dword [eax + 0x18]
mov edx, dword [ecx + 0x10]
mov ecx, dword [ebx + 0x8e8]
mov edi, dword [edx + 0x408]
push 0
call fcn.0048cb70
fild dword [ebp + 0x10]
push eax
sub esp, 0x10
fstp qword [esp + 8]
mov ecx, esi
fild dword [ebp + 0xc]
fstp qword [esp]
push 0
push 1
push edi
call fcn.00538a40
mov eax, dword [esp + 0xc]
mov dword [ebx + 0x8e8], eax
jmp 0x4ba6be
test edi, edi
mov dword [ebx + 0x8e8], ecx
je 0x4ba6be
mov eax, dword [esp + 0x3c]
xor esi, esi
test eax, eax
jbe 0x4ba5d8
lea ecx, [ecx]
mov ecx, dword [esp + 0x44]
mov ecx, dword [ecx + esi*4]
call fcn.0048cb70
test eax, eax
je 0x4ba5cf
fild dword [ebp + 0x10]
mov edx, dword [eax + 8]
mov ecx, dword [edx + 0x18]
mov edx, dword [ecx + 0x10]
mov ecx, dword [edx + 0x444]
push 0
push 0
sub esp, 0x10
fstp qword [esp + 8]
fild dword [ebp + 0xc]
fstp qword [esp]
push 0
push 0
push ecx
mov ecx, eax
call fcn.00538a40
mov eax, dword [esp + 0x3c]
inc esi
cmp esi, eax
jb 0x4ba590
fild dword [ebp + 0x10]
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + 8]
mov eax, dword [edx + 0x18]
mov edx, dword [eax + 0x10]
mov eax, dword [edx + 0x408]
push 0
push 0
sub esp, 0x10
fstp qword [esp + 8]
fild dword [ebp + 0xc]
fstp qword [esp]
push 0
push 1
push eax
call fcn.00538a40
jmp 0x4ba6be
mov eax, dword [ebx + 0x8e8]
test eax, eax
je 0x4ba6be
test esi, esi
je 0x4ba6b4
fild dword [ebp + 0x10]
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 8]
mov eax, dword [edx + 0x18]
mov edx, dword [eax + 0x10]
fstp qword [esp + 0x18]
fild dword [ebp + 0xc]
mov eax, dword [edx + 0x404]
push 0
push 0
sub esp, 0x10
fstp qword [esp + 0x38]
fld qword [esp + 0x30]
fstp qword [esp + 8]
fld qword [esp + 0x38]
fstp qword [esp]
push 0
push 1
push eax
call fcn.00538a40
mov esi, dword [esp + 0x30]
dec esi
js 0x4ba6b4
lea esp, [esp]
mov ecx, dword [esp + 0x38]
mov ecx, dword [ecx + esi*4]
call fcn.0048cb70
test eax, eax
je 0x4ba6b1
fld qword [esp + 0x18]
mov edx, dword [eax + 8]
mov ecx, dword [edx + 0x18]
mov edx, dword [ecx + 0x10]
mov ecx, dword [edx + 0x440]
push 0
push 0
sub esp, 0x10
fstp qword [esp + 8]
fld qword [esp + 0x38]
fstp qword [esp]
push 0
push 0
push ecx
mov ecx, eax
call fcn.00538a40
dec esi
jns 0x4ba670
mov dword [ebx + 0x8e8], 0
mov eax, dword [esp + 0x38]
test eax, eax
je 0x4ba6d9
mov edx, eax
push edx
call fcn.005dd350
add esp, 4
mov dword [esp + 0x38], 0
mov ecx, dword [esp + 0x44]
xor eax, eax
cmp ecx, eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], eax
je case.default.0x4ba1fb
mov eax, ecx
push eax
call fcn.005dd350
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
test edi, edi
mov ecx, dword [esp + 0x14]
mov dword [ebx + 0x8ec], ecx
je case.default.0x4ba1fb
fild dword [ebp + 0x10]
mov edx, dword [edi + 8]
mov eax, dword [edx + 0x18]
mov ecx, dword [eax + 0x10]
mov edx, dword [ecx + 0x3f4]
push 0
push 0
sub esp, 0x10
fstp qword [esp + 8]
mov ecx, edi
fild dword [ebp + 0xc]
fstp qword [esp]
push 0
push 1
push edx
call fcn.00538a40
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
test edi, edi
je 0x4ba780
fild dword [ebp + 0x10]
mov eax, dword [edi + 8]
mov ecx, dword [eax + 0x18]
mov edx, dword [ecx + 0x10]
mov eax, dword [edx + 0x40c]
push 0
push 0
sub esp, 0x10
fstp qword [esp + 8]
mov ecx, edi
fild dword [ebp + 0xc]
fstp qword [esp]
push 0
push 1
push eax
call fcn.00538a40
test esi, esi
mov ecx, dword [esp + 0xc]
mov edi, ecx
jne 0x4ba790
mov edi, dword [ebx + 0x23c]
xor esi, esi
cmp edi, esi
je 0x4ba842
cmp edi, dword [ebx + 0x8ec]
je 0x4ba7c1
cmp ecx, esi
je 0x4ba842
cmp ecx, dword [esp + 0x14]
jne 0x4ba842
call fcn.0048df10
test eax, eax
je 0x4ba842
call dword [0x5f6554]
mov esi, eax
mov eax, dword [ebx + 0x8f0]
and esi, 0x7fffffff
cmp edi, eax
jne 0x4ba861
call dword [0x5f64dc]
mov edx, dword [ebx + 0x8f4]
mov ecx, esi
sub ecx, edx
cmp ecx, eax
jge 0x4ba867
mov ecx, edi
call fcn.0048cb70
test eax, eax
je 0x4ba867
mov ecx, edi
call fcn.0048cb70
mov edx, dword [eax + 0x3c]
shr edx, 6
test dl, 1
je 0x4ba867
mov ecx, dword [esp + 0x10]
xor esi, esi
cmp ecx, esi
je 0x4ba842
fild dword [ebp + 0x10]
mov eax, dword [ecx + 8]
mov edx, dword [eax + 0x18]
mov eax, dword [edx + 0x10]
mov edx, dword [eax + 0x3b8]
push esi
push esi
sub esp, 0x10
fstp qword [esp + 8]
fild dword [ebp + 0xc]
fstp qword [esp]
push esi
push 1
push edx
call fcn.00538a40
mov dword [ebx + 0x8f4], esi
mov dword [ebx + 0x8f0], esi
mov dword [ebx + 0x8ec], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov dword [ebx + 0x8f0], edi
mov ecx, dword [esp + 0x10]
test ecx, ecx
mov dword [ebx + 0x8f4], esi
je 0x4ba84e
fild dword [ebp + 0x10]
mov eax, dword [ecx + 8]
mov edx, dword [eax + 0x18]
mov eax, dword [edx + 0x10]
mov edx, dword [eax + 0x3a0]
push 0
push 0
sub esp, 0x10
fstp qword [esp + 8]
fild dword [ebp + 0xc]
fstp qword [esp]
push 0
push 1
push edx
call fcn.00538a40
pop edi
pop esi
mov dword [ebx + 0x8ec], 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc