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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x80
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], ecx
mov esi, dword [ebp + 0x18]
mov edx, dword [ebp + 0x14]
mov edi, dword [ebp + 0xc]
movzx eax, byte [0x533158]
test al, al
je 0x4adea8
mov ecx, dword [ebp + 8]
and esi, edx
cmp esi, 0xffffffff
jne 0x4adb09
mov eax, dword [ebp + 0x10]
and eax, edi
mov edx, edi
cmp eax, 0xffffffff
je 0x4adc2f
mov eax, dword [ebp + 0x20]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0x1c]
mov dword [esp + 0x18], eax
movzx eax, byte [ebp + 0x24]
mov esi, dword [0x533830]
test al, al
je 0x4adb2f
cmp byte [ebp + 0x28], 0
jne 0x4adcad
cmp edx, 0x4000
mov ecx, edx
setb dl
mov ebx, ecx
cmp esi, ecx
seta cl
or cl, dl
jne 0x4adb6e
test al, al
je 0x4adb6e
cmp edi, 0xffffffff
je 0x4adc75
mov eax, dword [ebp + 0x1c]
mov edx, ebx
add eax, ebx
cmp eax, edi
mov ecx, dword [ebp + 8]
jne 0x4adcad
dec esi
test edi, esi
jne 0x4adb7b
jmp 0x4adcad
test cl, cl
mov ecx, dword [ebp + 8]
mov edx, ebx
jne 0x4adcad
mov dword [esp + 0x6c], edx
mov dword [esp + 0x30], 0
mov esi, ecx
call fcn.00504d20
mov dword [esp + 0x34], eax
mov ecx, 0x1c
mov edx, esi
call fcn.004acca0
mov esi, eax
mov dword [eax], 0x5161bc
mov dword [esp + 0x14], eax
add esi, 0xc
call fcn.004a9c10
mov ebx, eax
dec ebx
mov edi, dword [ebp + 0x1c]
and ebx, edi
mov edi, dword [esp + 0x6c]
add ebx, edi
call fcn.004a9c10
neg eax
mov edx, eax
sar edx, 0x1f
and edx, dword [ebp + 0x20]
and eax, dword [ebp + 0x1c]
mov dword [esp + 0x68], esi
mov ecx, esi
lea esi, [esp + 0x30]
push esi
push edx
push eax
push ebx
push 0
push dword [esp + 0x24]
call fcn.004a9a30
cmp dword [esp + 0x30], 0
jne 0x4adc1f
mov ecx, dword [esp + 0x68]
call fcn.004a7ba0
mov ebx, eax
call fcn.004a9c10
dec eax
and eax, dword [ebp + 0x1c]
add eax, ebx
mov ecx, dword [esp + 0x14]
mov dword [ecx + 4], eax
add eax, edi
mov dword [ecx + 8], eax
cmp dword [esp + 0x30], 0
je 0x4ade5a
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp + 8]
mov edx, edi
jmp 0x4adcad
xorps xmm0, xmm0
movups xmmword [esp + 0x3c], xmm0
movaps xmmword [esp + 0x30], xmm0
mov dword [esp + 0x4c], 0xffff
movaps xmmword [esp + 0x50], xmm0
lea eax, [esp + 0x30]
push eax
mov esi, dword [esp + 0x14]
push esi
call fcn.004a9730
add esp, 8
test eax, eax
je 0x4ade35
mov ecx, dword [esp + 0xc]
or byte [ecx + 8], 1
mov dword [ecx], eax
mov dword [ecx + 4], edx
jmp 0x4ade2d
xorps xmm0, xmm0
movups xmmword [esp + 0x3c], xmm0
movaps xmmword [esp + 0x30], xmm0
mov dword [esp + 0x4c], 0xffff
movaps xmmword [esp + 0x50], xmm0
lea eax, [esp + 0x30]
push eax
push dword [esp + 0x14]
call fcn.004a9730
add esp, 8
test eax, eax
je 0x4ade51
mov ecx, dword [ebp + 8]
mov edx, ebx
lea eax, [ebp + 0x2c]
movzx eax, word [eax]
mov word [esp + 0x70], ax
sub esp, 0x10
mov word [esp + 0xc], ax
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
lea eax, [esp + 0x34]
mov dword [esp], eax
call fcn.004ad600
add esp, 0x10
mov eax, dword [esp + 0x24]
test eax, eax
je 0x4ade08
mov ebx, dword [eax + 4]
mov edi, dword [eax + 8]
sub edi, ebx
jmp 0x4adcf8
test esi, esi
jne 0x4addf3
test edi, edi
je 0x4addf8
mov dword [esp + 0x74], ebx
mov dword [esp + 0x78], edi
sub esp, 0x18
movsd xmm0, qword [esp + 0x8c]
movsd qword [esp + 8], xmm0
mov eax, dword [esp + 0x34]
mov dword [esp + 0x14], eax
mov esi, dword [esp + 0x30]
mov dword [esp + 0x10], esi
mov eax, dword [esp + 0x28]
mov dword [esp + 4], eax
lea eax, [esp + 0x48]
mov dword [esp], eax
call fcn.004aa9a0
add esp, 0x18
test byte [esp + 0x34], 1
jne 0x4add70
mov eax, dword [esp + 0x30]
test eax, eax
je 0x4addd5
sub edi, eax
add ebx, eax
add esi, eax
mov dword [esp + 0x18], esi
adc dword [esp + 0x1c], 0
xor esi, esi
test byte [esp + 0x34], 1
je 0x4adcf0
jmp 0x4addb7
mov eax, dword [esp + 0x30]
mov dword [esp + 0x30], 0
mov dword [esp + 0x20], eax
lea eax, [esp + 0x20]
push eax
call fcn.0049cfd0
add esp, 4
mov ecx, dword [esp + 0xc]
or byte [ecx + 8], 1
mov dword [ecx + 4], edx
mov dword [ecx], eax
mov ecx, dword [esp + 0x20]
mov esi, 1
test ecx, ecx
je 0x4addac
mov eax, dword [ecx]
call dword [eax + 4]
test byte [esp + 0x34], 1
je 0x4adcf0
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x30], 0
test ecx, ecx
je 0x4adcf0
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x4adcf0
push edi
push 0
push ebx
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
mov esi, 3
test byte [esp + 0x34], 1
je 0x4adcf0
jmp 0x4addb7
cmp esi, 3
jne 0x4ade20
mov ecx, dword [esp + 0xc]
and byte [ecx + 8], 0xfe
mov eax, dword [esp + 0x24]
mov dword [ecx], eax
jmp 0x4ade2d
call fcn.00504e40
mov ecx, dword [esp + 0xc]
or byte [ecx + 8], 1
mov dword [ecx + 4], eax
mov dword [ecx], 0xc
jmp 0x4ade2d
mov ecx, dword [esp + 0x24]
test ecx, ecx
je 0x4ade2d
mov eax, dword [ecx]
call dword [eax + 4]
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [esp + 0x48]
cmp eax, 2
je 0x4ade43
cmp eax, 5
jne 0x4ade6a
mov edx, dword [esp + 0x44]
mov edi, edx
mov ecx, dword [ebp + 8]
jmp 0x4adb09
mov edi, dword [esp + 0x44]
jmp 0x4adb52
mov edi, dword [esp + 0xc]
and byte [edi + 8], 0xfe
mov eax, dword [esp + 0x14]
mov dword [edi], eax
jmp 0x4ade2d
lea ecx, [esp + 0x24]
mov edx, esi
push dword [ebp + 8]
call fcn.004adf40
add esp, 4
test byte [esp + 0x2c], 1
mov edx, dword [esp + 0xc]
movzx eax, byte [edx + 8]
jne 0x4ade97
and al, 0xfe
mov ecx, dword [esp + 0x24]
mov dword [edx], ecx
mov byte [edx + 8], al
jmp 0x4ade2d
or al, 1
movsd xmm0, qword [esp + 0x24]
movsd qword [edx], xmm0
mov byte [edx + 8], al
jmp 0x4ade2d
push 0x533158
mov ebx, edx
call sub.libc.dll___cxa_guard_acquire
mov edx, ebx
add esp, 4
test eax, eax
je 0x4adaef
call fcn.004ae2c0
mov dword [0x533830], eax
push 0x533158
call sub.libc.dll___cxa_guard_release
mov edx, ebx
add esp, 4
jmp 0x4adaef