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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xdc
mov ebx, dword [esp + 0x108]
mov ax, word [ebx + 0xe]
mov esi, dword [ebx + 0x10]
sar ax, 5
mov edi, dword [ebx + 0x14]
push eax
fild word [esp]
add esp, 4
fnstcw word [esp + 0x8a]
mov ax, word [esp + 0x8a]
mov ah, 0xc
mov word [esp + 0x88], ax
fldcw word [esp + 0x88]
fist dword [esp + 0x84]
fldcw word [esp + 0x8a]
mov eax, dword [esp + 0x84]
fld dword [eax*4 + 0x593ae0]
fstp dword [esp + 0x3c]
fld dword [eax*4 + 0x594080]
fstp dword [esp + 0x40]
push ebx
mov eax, dword [esp + 0xf8]
push eax
mov eax, dword [esp + 0xf8]
push eax
fstp dword [esp + 0xc]
call fcn.004b81a0
add esp, 0xc
mov ecx, dword [0x71f468]
test ecx, ecx
fld dword [esp]
je 0x4baa77
push esi
fild dword [esp]
fmul dword [0x594628]
add esp, 4
mov eax, dword [esp + 0x100]
mov edx, dword [esp + 0x104]
fstp dword [esp + 0x34]
mov ebp, dword [ebx + 0x1c]
mov esi, dword [ebx + 0x20]
add edx, esi
add eax, ebp
mov dword [esp + 0x80], eax
mov dword [esp + 0x7c], edx
mov dl, byte [ebx + 0xe]
mov bl, dl
and ebx, 2
mov byte [esp + 0x22], bl
jne 0x4ba99e
mov eax, dword [esp + 0x80]
neg eax
push eax
fild dword [esp]
add esp, 4
fmul dword [esp + 0x34]
push edi
fild dword [esp]
fmul dword [0x594628]
add esp, 4
and edx, 4
mov byte [esp + 0x23], dl
fstp dword [esp + 0x38]
fst dword [esp + 0xa0]
je 0x4baa96
mov eax, dword [esp + 0x7c]
mov ebx, dword [0x71f488]
sub eax, ebx
push eax
fild dword [esp]
add esp, 4
fmul dword [esp + 0x38]
fst dword [esp + 0x90]
push ecx
mov edx, 1
fild dword [esp]
add esp, 4
fmul dword [esp + 0x34]
fnstcw word [esp + 0x8a]
mov ax, word [esp + 0x8a]
lea edi, [esp + 0xa0]
mov ah, 0xc
lea esi, [esp + 0x90]
fadd st(2)
lea ebx, [esp + 0xc0]
lea ecx, [esp + 0xb0]
mov word [esp + 0x88], ax
fst dword [esp + 0xa4]
fxch st(1)
fst dword [esp + 0x94]
fxch st(2)
fstp dword [esp + 0xa8]
fild dword [0x71f488]
fmul dword [esp + 0x38]
faddp st(2)
fxch st(1)
fst dword [esp + 0x98]
fxch st(1)
fstp dword [esp + 0xac]
fstp dword [esp + 0x9c]
fild dword [esp + 0xf8]
fild dword [esp + 0xfc]
fstp dword [esp + 0x78]
fld dword [edi + edx*4 - 4]
fld dword [esi + edx*4 - 4]
fld dword [esp + 0x40]
fmul st(2)
fadd st(3)
fld dword [esp + 0x3c]
fmul st(2)
fsubp st(1)
fldcw word [esp + 0x88]
fistp dword [ebx + edx*4 - 4]
fldcw word [esp + 0x8a]
fxch st(1)
fmul dword [esp + 0x3c]
fadd dword [esp + 0x78]
fxch st(1)
fmul dword [esp + 0x40]
faddp st(1)
fldcw word [esp + 0x88]
fistp dword [ecx + edx*4 - 4]
fldcw word [esp + 0x8a]
inc edx
cmp edx, 5
jne 0x4ba4d3
mov eax, dword [esp + 0xc8]
mov ebp, dword [esp + 0xcc]
mov edx, dword [esp + 0xc4]
mov ecx, dword [esp + 0xc0]
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x70], eax
cmp eax, ebp
jge 0x4ba55b
mov dword [esp + 0x70], ebp
mov ebx, dword [esp + 0x28]
cmp dword [esp + 0x70], ebx
jge 0x4ba569
mov dword [esp + 0x70], ebx
mov esi, dword [esp + 0x2c]
cmp dword [esp + 0x70], esi
jge 0x4ba577
mov dword [esp + 0x70], esi
mov eax, dword [0x71f478]
cmp dword [esp + 0x70], eax
jle 0x4ba586
mov dword [esp + 0x70], eax
mov edi, dword [esp + 0xb8]
mov edx, dword [esp + 0xbc]
mov ecx, dword [esp + 0xb4]
mov ebx, dword [esp + 0xb0]
mov esi, edi
cmp edi, edx
jle 0x4ba5aa
mov esi, edx
cmp esi, ecx
jle 0x4ba5b0
mov esi, ecx
cmp esi, ebx
jle 0x4ba5b6
mov esi, ebx
mov eax, esi
mov dword [esp + 0x74], edi
xor eax, 0xffffffff
sar eax, 0x1f
and esi, eax
cmp edi, edx
jge 0x4ba5cc
mov dword [esp + 0x74], edx
cmp dword [esp + 0x74], ecx
jge 0x4ba5d6
mov dword [esp + 0x74], ecx
cmp dword [esp + 0x74], ebx
jge 0x4ba5e0
mov dword [esp + 0x74], ebx
mov eax, dword [0x71f498]
cmp dword [esp + 0x74], eax
jle 0x4ba5ef
mov dword [esp + 0x74], eax
cmp byte [esp + 0x22], 0
je 0x4baa8b
fld dword [esp + 0x34]
fchs
fstp dword [esp + 0x34]
cmp byte [esp + 0x23], 0
je 0x4baa84
fld dword [esp + 0x38]
fchs
fstp dword [esp + 0x38]
fxch st(1)
fchs
fldcw word [esp + 0x88]
fistp dword [esp + 0x84]
fldcw word [esp + 0x8a]
mov ebx, 0x168
mov edx, dword [esp + 0x84]
mov eax, edx
sar edx, 0x1f
idiv ebx
add edx, 0x168
mov eax, edx
sar edx, 0x1f
idiv ebx
push edx
fild dword [esp]
add esp, 4
fldcw word [esp + 0x88]
fistp dword [esp + 0x84]
fldcw word [esp + 0x8a]
cmp esi, dword [esp + 0x74]
mov eax, dword [esp + 0x84]
fld dword [eax*4 + 0x593ae0]
fld dword [eax*4 + 0x594080]
jge 0x4baa73
mov edx, dword [esp + 0x24]
mov dword [esp + 0x6c], edx
cmp edx, ebp
jle 0x4ba69d
mov dword [esp + 0x6c], ebp
mov ecx, dword [esp + 0x28]
cmp dword [esp + 0x6c], ecx
jle 0x4ba6ab
mov dword [esp + 0x6c], ecx
mov ebx, dword [esp + 0x2c]
cmp dword [esp + 0x6c], ebx
jle 0x4ba6b9
mov dword [esp + 0x6c], ebx
fld1
fld dword [esp + 0x34]
fdivr st(1)
fxch st(1)
mov eax, dword [esp + 0x6c]
mov edx, dword [esp + 0x6c]
xor eax, 0xffffffff
sar eax, 0x1f
and edx, eax
mov dword [esp + 0x6c], edx
fdiv dword [esp + 0x38]
fld st(1)
fmul st(3)
fstp dword [esp + 0x44]
fld st(1)
fmul st(4)
fstp dword [esp + 0x48]
fld st(0)
fchs
fmul st(4)
fstp dword [esp + 0x4c]
fld st(0)
fmul st(3)
fstp dword [esp + 0x50]
fild dword [esp + 0x80]
fild dword [esp + 0x7c]
fstp dword [esp + 0x54]
fsub st(5), st(0)
fxch st(5)
fldcw word [esp + 0x88]
fistp dword [esp + 0x84]
fldcw word [esp + 0x8a]
mov eax, dword [esp + 0x84]
push eax
fild dword [esp]
fadd st(5)
add esp, 4
fchs
fmulp st(2)
fld dword [esp + 0x78]
fsub dword [esp + 0x54]
fldcw word [esp + 0x88]
fistp dword [esp + 0x84]
fldcw word [esp + 0x8a]
mov eax, dword [esp + 0x84]
push eax
fild dword [esp]
add esp, 4
fadd dword [esp + 0x54]
push esi
fmulp st(1)
fild dword [esp]
add esp, 4
fst dword [esp + 0x30]
fild dword [esp + 0x6c]
fxch st(1)
fmul dword [esp + 0x4c]
fstp dword [esp + 0x58]
fld st(2)
fmul st(4)
fld st(2)
fmul st(6)
faddp st(1)
faddp st(6)
fxch st(5)
fadd dword [esp + 0x58]
fstp dword [esp + 0x58]
fld dword [esp + 0x44]
fmul st(5)
mov eax, dword [esp + 0xf0]
add eax, 0x14
mov dword [esp + 0x68], esi
mov dword [esp + 0x18], eax
fadd dword [esp + 0x58]
fst dword [esp + 0x58]
fld dword [esp + 0x50]
fmul dword [esp + 0x30]
fxch st(5)
fmulp st(3)
fxch st(3)
fmulp st(1)
fsubp st(1)
fadd dword [esp + 0x54]
faddp st(2)
fxch st(2)
fmul dword [esp + 0x48]
faddp st(1)
fst dword [esp + 0x60]
fxch st(1)
fstp dword [esp + 0x5c]
fstp dword [esp + 0x64]
mov edi, dword [esp + 0x6c]
mov eax, dword [esp + 0x70]
cmp edi, eax
jl 0x4ba874
jmp 0x4ba9b0
cmp eax, 0x727073
je 0x4baa01
cmp eax, 0x706d62
je 0x4ba9ec
mov edx, dword [esp + 0xf0]
mov ecx, dword [esp + 0xf0]
mov ebx, dword [esp + 0x18]
mov eax, dword [edx + 0xc]
mov esi, dword [ecx + 4]
mov edx, dword [eax*4 + 0x5481f4]
mov eax, dword [esp + 0x68]
imul eax, esi
push ecx
push edx
lea eax, [edi + eax]
push 0
imul eax, edx
add eax, ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0x10
inc edi
cmp edi, dword [esp + 0x70]
je 0x4ba9b0
fld dword [esp + 0x5c]
fadd dword [esp + 0x44]
fstp dword [esp + 0x5c]
fld dword [esp + 0x64]
fadd dword [esp + 0x48]
fstp dword [esp + 0x64]
fnstcw word [esp + 0x8a]
mov ax, word [esp + 0x8a]
mov ah, 0xc
mov word [esp + 0x88], ax
fld dword [esp + 0x5c]
fldcw word [esp + 0x88]
fistp dword [esp + 0x84]
fldcw word [esp + 0x8a]
mov edx, dword [esp + 0x84]
test edx, edx
js 0x4ba851
fld dword [esp + 0x64]
fldcw word [esp + 0x88]
fistp dword [esp + 0x84]
fldcw word [esp + 0x8a]
cmp edx, dword [0x71f468]
mov ecx, dword [esp + 0x84]
jge 0x4ba851
test ecx, ecx
js 0x4ba851
cmp ecx, dword [0x71f488]
jge 0x4ba851
mov eax, dword [esp + 0xf4]
mov ebp, dword [eax]
mov eax, dword [ebp]
cmp eax, 0x726373
jne 0x4ba800
mov ebx, dword [esp + 0xf0]
mov eax, dword [ebx + 0xc]
cmp eax, 2
je 0x4babbe
cmp eax, 4
je 0x4baaac
test eax, eax
jne 0x4ba851
mov eax, dword [ebp + 4]
imul ecx, eax
lea eax, [ebp + edx]
mov ebp, dword [0x5e3240]
test ebp, ebp
mov cl, byte [ecx + eax + 0x14]
je 0x4ba94c
test cl, cl
je 0x4ba851
mov eax, dword [0x5e3200]
test eax, eax
jne 0x4baca4
mov esi, dword [esp + 0x18]
mov ebx, dword [esp + 0xf0]
mov eax, dword [esp + 0x68]
lea edx, [edi + esi]
mov esi, dword [ebx + 4]
imul eax, esi
lea ebx, [edx + eax]
mov edx, dword [0x5e31f0]
test edx, edx
je 0x4ba997
xor eax, eax
push ebp
mov al, byte [ebx]
mov esi, dword [0x5e3230]
push eax
xor eax, eax
mov al, cl
push eax
push esi
call edx
add esp, 0x10
mov cl, al
mov byte [ebx], cl
jmp 0x4ba851
sub eax, ecx
push eax
fild dword [esp]
add esp, 4
fmul dword [esp + 0x34]
jmp 0x4ba3f9
mov eax, dword [esp + 0x68]
mov ebx, dword [esp + 0x74]
inc eax
mov dword [esp + 0x68], eax
cmp dword [esp + 0x68], ebx
je 0x4baa79
fld dword [esp + 0x58]
fadd dword [esp + 0x4c]
fst dword [esp + 0x58]
fld dword [esp + 0x60]
fadd dword [esp + 0x50]
fst dword [esp + 0x60]
fstp dword [esp + 0x64]
fstp dword [esp + 0x5c]
jmp 0x4ba7e7
push edi
push 0x93
push str.source_gamelib_transform.c
push str.sizeof_s_screen__sizeof_s_bitmap_
call sub.msvcrt.dll__assert
mov ebx, dword [esp + 0xf0]
mov eax, dword [ebx + 0xc]
cmp eax, 2
je 0x4bab70
cmp eax, 4
je 0x4bab22
test eax, eax
jne 0x4ba851
lea ebx, [ebp + ecx*4 + 0x30]
mov eax, dword [ebp + ecx*4 + 0x30]
add ebx, eax
xor esi, esi
mov al, byte [ebx]
cmp al, 0xff
je 0x4ba851
and eax, 0xff
add esi, eax
cmp edx, esi
jl 0x4ba851
mov al, byte [ebx + 1]
add ebx, 2
test al, al
je 0x4baa31
and eax, 0xff
lea ecx, [eax + esi]
cmp edx, ecx
jl 0x4bad4b
add ebx, eax
mov esi, ecx
mov al, byte [ebx]
cmp al, 0xff
jne 0x4baa3b
jmp 0x4ba851
fstp st(0)
fstp st(0)
fstp st(0)
add esp, 0xdc
pop ebx
pop esi
pop edi
pop ebp
ret
fxch st(1)
jmp 0x4ba61d
fxch st(1)
fchs
fxch st(1)
jmp 0x4ba604
mov eax, dword [esp + 0x7c]
neg eax
push eax
fild dword [esp]
add esp, 4
fmul dword [esp + 0x38]
jmp 0x4ba435
mov ebx, dword [esp + 0xf0]
mov eax, dword [esp + 0x68]
mov esi, dword [ebx + 4]
imul eax, esi
mov esi, dword [esp + 0x18]
add eax, edi
lea ebx, [esi + eax*4]
mov eax, dword [ebp + 0xc]
cmp eax, 1
mov esi, dword [ebx]
je 0x4bac71
cmp eax, 4
jne 0x4ba851
mov eax, dword [ebp + 4]
imul ecx, eax
lea eax, [ecx + edx]
mov ecx, dword [0x5e3240]
test ecx, ecx
mov eax, dword [ebp + eax*4 + 0x14]
jne 0x4bacb9
mov ecx, dword [0x5e3200]
test ecx, ecx
je 0x4bab04
mov eax, ecx
mov ecx, dword [0x5e3220]
test ecx, ecx
je 0x4bad3c
push ebp
push ebp
push esi
push eax
call ecx
add esp, 0x10
mov dword [ebx], eax
jmp 0x4ba851
mov esi, dword [ebp + ecx*4 + 0x30]
lea ebx, [ebp + ecx*4 + 0x30]
add ebx, esi
xor esi, esi
mov al, byte [ebx]
cmp al, 0xff
je 0x4ba851
and eax, 0xff
add esi, eax
cmp edx, esi
jl 0x4ba851
mov al, byte [ebx + 1]
add ebx, 2
test al, al
je 0x4bab2e
and eax, 0xff
lea ecx, [eax + esi]
cmp edx, ecx
jl 0x4bace1
add ebx, eax
mov esi, ecx
mov al, byte [ebx]
cmp al, 0xff
jne 0x4bab38
jmp 0x4ba851
mov esi, dword [ebp + ecx*4 + 0x30]
lea ebx, [ebp + ecx*4 + 0x30]
add ebx, esi
xor esi, esi
mov al, byte [ebx]
cmp al, 0xff
je 0x4ba851
and eax, 0xff
add esi, eax
cmp edx, esi
jl 0x4ba851
mov al, byte [ebx + 1]
add ebx, 2
test al, al
je 0x4bab7c
and eax, 0xff
lea ecx, [eax + esi]
cmp edx, ecx
jl 0x4bad86
add ebx, eax
mov esi, ecx
mov al, byte [ebx]
cmp al, 0xff
jne 0x4bab86
jmp 0x4ba851
mov esi, dword [esp + 0xf0]
mov eax, dword [esp + 0x68]
mov ebx, dword [esi + 4]
mov esi, dword [esp + 0x18]
imul eax, ebx
add eax, edi
lea ebx, [esi + eax*2]
mov eax, dword [ebp + 0xc]
cmp eax, 1
mov si, word [ebx]
je 0x4bac40
cmp eax, 2
jne 0x4ba851
mov eax, dword [ebp + 4]
imul ecx, eax
lea eax, [ecx + edx]
mov ecx, dword [0x5e3240]
test ecx, ecx
mov dx, word [ebp + eax*2 + 0x14]
jne 0x4bacab
mov eax, dword [0x5e3200]
test eax, eax
je 0x4bac13
mov edx, eax
mov ecx, dword [0x5e3210]
test ecx, ecx
je 0x4bad43
mov eax, esi
push ebp
and eax, 0xffff
push ebp
push eax
mov eax, edx
and eax, 0xffff
push eax
call ecx
add esp, 0x10
mov word [ebx], ax
jmp 0x4ba851
lea eax, [ebp + edx + 0x14]
mov edx, dword [ebp + 4]
imul ecx, edx
mov edx, dword [0x5e3240]
add eax, ecx
test edx, edx
jne 0x4bacd2
mov al, byte [eax]
mov edx, dword [0x5e3230]
test edx, edx
je 0x4bae06
and eax, 0xff
mov dx, word [edx + eax*2]
jmp 0x4bac08
lea eax, [ebp + edx + 0x14]
mov edx, dword [ebp + 4]
imul ecx, edx
mov edx, dword [0x5e3240]
add eax, ecx
test edx, edx
jne 0x4bacc6
mov al, byte [eax]
mov edx, dword [0x5e3230]
test edx, edx
je 0x4badf7
and eax, 0xff
mov eax, dword [edx + eax*4]
jmp 0x4baaf8
mov cl, al
jmp 0x4ba959
test dx, dx
je 0x4ba851
jmp 0x4bac08
test eax, eax
je 0x4ba851
jmp 0x4baaf8
mov al, byte [eax]
test al, al
je 0x4ba851
jmp 0x4bac89
mov al, byte [eax]
test al, al
je 0x4ba851
jmp 0x4bac58
sub edx, esi
mov dl, byte [edx + ebx]
test dl, dl
je 0x4ba851
mov ecx, dword [esp + 0xf0]
mov eax, dword [esp + 0x68]
mov esi, dword [esp + 0x18]
mov ebx, dword [ecx + 4]
imul eax, ebx
lea eax, [edi + eax]
lea ebx, [esi + eax*4]
mov eax, dword [0x5e3200]
test eax, eax
mov esi, dword [ebx]
jne 0x4bad29
mov ecx, dword [0x5e3230]
test ecx, ecx
je 0x4bae1e
xor eax, eax
mov al, dl
mov eax, dword [ecx + eax*4]
mov edx, dword [0x5e3220]
test edx, edx
je 0x4bad3c
push ecx
push ecx
push esi
push eax
call edx
add esp, 0x10
mov dword [ebx], eax
jmp 0x4ba851
mov word [ebx], dx
jmp 0x4ba851
sub edx, esi
mov cl, byte [edx + ebx]
test cl, cl
je 0x4ba851
mov esi, dword [esp + 0xf0]
mov eax, dword [esp + 0x68]
mov edx, dword [esp + 0x18]
mov ebp, dword [esi + 4]
add edx, edi
imul eax, ebp
lea ebx, [edx + eax]
mov eax, dword [0x5e3200]
test eax, eax
je 0x4ba974
mov cl, al
jmp 0x4ba974
sub edx, esi
mov dl, byte [edx + ebx]
test dl, dl
je 0x4ba851
mov ecx, dword [esp + 0xf0]
mov eax, dword [esp + 0x68]
mov esi, dword [esp + 0x18]
mov ebx, dword [ecx + 4]
imul eax, ebx
lea eax, [edi + eax]
lea ebx, [esi + eax*2]
mov eax, dword [0x5e3200]
mov ecx, eax
test eax, eax
mov si, word [ebx]
jne 0x4badce
mov ecx, dword [0x5e3230]
test ecx, ecx
je 0x4bae2f
xor eax, eax
mov al, dl
mov cx, word [ecx + eax*2]
mov edx, dword [0x5e3210]
test edx, edx
je 0x4bae16
mov eax, esi
push ebp
and eax, 0xffff
push ebp
push eax
mov eax, ecx
and eax, 0xffff
push eax
call edx
add esp, 0x10
mov word [ebx], ax
jmp 0x4ba851
xor edx, edx
mov dl, al
mov eax, dword [ebp + 0x10]
mov eax, dword [eax + edx*4]
jmp 0x4baaf8
xor edx, edx
mov dl, al
mov eax, dword [ebp + 0x10]
mov dx, word [eax + edx*2]
jmp 0x4bac08
mov word [ebx], cx
jmp 0x4ba851
and edx, 0xff
mov eax, dword [ebp + 0x2c]
mov eax, dword [eax + edx*4]
jmp 0x4bad29
and edx, 0xff
mov eax, dword [ebp + 0x2c]
mov cx, word [eax + edx*2]
jmp 0x4badce