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

Disassembly:
sub esp, 0x34
push ebx
mov ebx, dword [esp + 0x3c]
mov al, byte [ebx + 0x78]
test al, al
push ebp
push esi
push edi
jne 0x50310a
mov eax, dword [ebx + 0xb8]
test eax, eax
je 0x50310a
mov edi, ebx
call fcn.00502c00
fstp qword [esp + 0x20]
mov eax, dword [ebx + 0x80]
cmp eax, 1
je 0x502fd9
test eax, eax
je 0x502fd9
mov eax, dword [ebx + 0xb4]
mov edi, dword [eax]
cmp edi, eax
mov esi, edi
mov dword [esp + 0x14], esi
je 0x502fd9
jmp 0x502e02
mov esi, dword [esp + 0x14]
mov eax, dword [edi + 8]
fld qword [eax + 0x40]
add eax, 0x30
fadd qword [eax]
sub esp, 0x10
fmul qword [0x594dc8]
fstp qword [esp + 0x28]
fld qword [eax + 0x18]
fadd qword [eax + 8]
mov eax, ebx
fmul qword [0x594dc8]
fstp qword [esp + 8]
fld qword [esp + 0x28]
fstp qword [esp]
call fcn.00501fd0
mov eax, dword [ebx + 0xb4]
fadd qword [esp + 0x18]
cmp edi, eax
je 0x502e5d
mov eax, dword [edi + 8]
fcom qword [eax + 0x30]
fnstsw ax
test ah, 0x41
jne 0x502e5d
mov edi, dword [edi]
cmp edi, dword [ebx + 0xb4]
jne 0x502e46
mov eax, dword [edi + 4]
fstp st(0)
mov ebp, dword [eax + 8]
mov dword [esp + 0x18], eax
mov al, byte [esp + 0x4c]
add ebp, 8
test al, al
je 0x502f1e
cmp dword [ebx + 0x80], 4
jne 0x502f1e
mov edx, dword [ebp + 0x18]
cmp edx, 8
mov esi, dword [ebp + 0x14]
lea eax, [ebp + 4]
jb 0x502e97
mov ecx, dword [eax]
jmp 0x502e99
mov ecx, eax
cmp word [ecx + esi*2 - 2], 0x20
jne 0x502ebe
cmp edx, 8
jb 0x502ea8
mov eax, dword [eax]
mov word [eax + esi*2 - 2], 0
mov ecx, dword [ebp + 0x14]
dec ecx
push ecx
mov ecx, ebp
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::resize_unsigned_int_]
jmp 0x502e85
mov edx, dword [esp + 0x18]
mov eax, dword [edx + 8]
mov ecx, dword [eax + 0x24]
mov esi, dword [ebx + 0x28]
push ecx
call fcn.005016e0
add esp, 4
lea edx, [esp + 0x28]
push edx
mov esi, eax
push ebx
mov eax, ebp
call fcn.005011d0
push esi
mov esi, dword [ebx + 0x28]
call fcn.005016e0
mov eax, dword [ebx]
add esp, 4
mov ecx, ebx
call dword [eax + 4]
fild dword [esp + 0x28]
test al, al
mov esi, dword [esp + 0x14]
je 0x502f11
mov ecx, dword [esp + 0x18]
fmul qword [ebx + 0x100]
mov eax, dword [ecx + 8]
jmp 0x502f18
mov edx, dword [esp + 0x18]
mov eax, dword [edx + 8]
fadd qword [eax + 0x30]
fstp qword [eax + 0x40]
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 8]
fld qword [ecx + 0x40]
sub esp, 0x10
fstp qword [esp + 0x28]
mov eax, ebx
fld qword [ebx + 0x40]
fstp qword [esp + 8]
fld qword [esp + 0x28]
fstp qword [esp]
call fcn.00501fd0
fstp qword [esp + 0x30]
sub esp, 0x10
fld qword [esp + 0x30]
mov eax, ebx
fadd qword [ebx + 0x40]
fstp qword [esp + 8]
fld qword [esp + 0x28]
fstp qword [esp]
call fcn.00501fd0
fld qword [esp + 0x30]
fcomp st(1)
fnstsw ax
test ah, 5
jp 0x502f77
fstp st(0)
fld qword [esp + 0x30]
mov eax, dword [ebx + 0x80]
cmp eax, 3
jne 0x502f88
fmul qword [0x594dc8]
cmp eax, 4
fst qword [esp + 0x30]
je 0x50303b
cmp esi, edi
mov ecx, esi
je 0x502fc7
jmp 0x502fa0
mov eax, dword [ecx + 8]
fld st(0)
fadd qword [eax + 0x30]
add eax, 0x30
fstp qword [eax]
fld st(0)
fadd qword [eax + 0x10]
fstp qword [eax + 0x10]
fld qword [eax + 8]
fstp qword [eax + 8]
fld qword [eax + 0x18]
fstp qword [eax + 0x18]
mov ecx, dword [ecx]
cmp ecx, edi
jne 0x502fa0
fstp st(0)
cmp edi, dword [ebx + 0xb4]
mov dword [esp + 0x14], edi
jne 0x502dfe
lea eax, [ebx + 0xa4]
push eax
lea ecx, [ebx + 0xb0]
push ecx
call fcn.005012c0
fld qword [ebx + 8]
fstp qword [ebx + 0x38]
sub esp, 0x20
fld qword [esp + 0x48]
mov ecx, ebx
fadd qword [ebx + 0x40]
fst qword [ebx + 0x40]
fld qword [0x594fc8]
fstp qword [esp + 0x20]
fld qword [esp + 0x48]
fstp qword [esp + 0x18]
fld qword [0x594cf8]
fstp qword [esp + 0x10]
fstp qword [esp + 8]
fld qword [0x594fc0]
fstp qword [esp]
call fcn.005031a0
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret 8
mov al, byte [esp + 0x4c]
fstp st(0)
test al, al
je 0x502fc9
cmp esi, edi
mov dword [esp + 0x18], 0
mov ebp, esi
je 0x502fc9
jmp 0x503060
mov esi, dword [ebp + 8]
add esi, 8
mov ebx, 0x20
call fcn.00505c00
mov ecx, dword [esp + 0x18]
mov ebp, dword [ebp]
add ecx, eax
cmp ebp, edi
mov dword [esp + 0x18], ecx
jne 0x503060
mov eax, ecx
test eax, eax
je 0x503101
fld qword [0x594cf8]
mov ebp, dword [esp + 0x14]
fst qword [esp + 0x38]
fild dword [esp + 0x18]
fdivr qword [esp + 0x30]
fstp qword [esp + 0x30]
mov eax, dword [ebp + 8]
fld st(0)
fadd qword [eax + 0x30]
add eax, 0x30
mov ebx, 0x20
fstp qword [eax]
fadd qword [eax + 0x10]
fstp qword [eax + 0x10]
fld qword [eax + 8]
fstp qword [eax + 8]
fld qword [eax + 0x18]
fstp qword [eax + 0x18]
mov edx, dword [ebp + 8]
fld qword [esp + 0x30]
fstp qword [edx + 0x88]
mov esi, dword [ebp + 8]
add esi, 8
call fcn.00505c00
mov ebp, dword [ebp]
cmp ebp, edi
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fmul qword [esp + 0x30]
fadd qword [esp + 0x38]
fst qword [esp + 0x38]
jne 0x5030a1
mov ebx, dword [esp + 0x48]
jmp 0x502fc7
mov ebx, dword [esp + 0x48]
jmp 0x502fc9
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x34
ret 8