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

Disassembly:
sub esp, 0x40
mov eax, dword [esp + 0x4c]
mov ecx, dword [eax]
mov edx, dword [esp + 0x48]
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x38], eax
push ebx
mov eax, 0xfffffffe
push ebp
mov ebp, dword [esp + 0x78]
mov dword [esp + 0x74], eax
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x64]
push esi
mov esi, dword [edx]
mov dword [esp + 0xc], ecx
lea ecx, [eax + 4]
mov dword [esp + 0x48], esi
mov dword [esp + 0x68], ecx
cmp word [esi], 0x7f
push edi
mov edi, esi
mov dword [esp + 0x38], esi
jne 0x4812e7
movzx ecx, word [esi + 4]
mov edx, dword [ebp + 0x20]
mov dword [esp + 0x28], ecx
mov word [esp + 0x44], cx
mov dword [esp + 0x40], edx
xor ecx, ecx
lea edx, [esp + 0x40]
mov word [esp + 0x46], cx
mov dword [ebp + 0x20], edx
lea eax, [eax + eax + 4]
lea ecx, [esi + 2]
mov dword [esp + 0x30], eax
add esi, eax
mov eax, dword [esp + 0x84]
xor edx, edx
neg eax
mov word [ecx], dx
mov ebx, dword [ebp + 0x38]
mov dword [esp + 0x3c], ecx
sbb eax, eax
lea ecx, [esp + 0x6c]
and eax, ecx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x34], eax
cmp dword [esp + 0x68], 0
mov dword [esp + 0x80], esi
je 0x481332
mov edx, dword [esp + 0x2c]
mov dword [ebp + 0x38], edx
cmp dword [esp + 0x64], 0
je 0x48135c
mov ecx, 0x76
mov word [esi], cx
add esi, 2
xor edx, edx
mov word [esi], dx
mov dword [esp + 0x24], esi
add esi, 2
add dword [esp + 0x6c], 2
mov dword [esp + 0x80], esi
push eax
mov eax, dword [esp + 0x74]
push ebp
push eax
lea ecx, [esp + 0x54]
push ecx
mov ecx, dword [esp + 0x70]
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x34]
push eax
push ecx
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0xa0]
push eax
lea ecx, [esp + 0x78]
push ecx
call fcn.0047d060
add esp, 0x28
test eax, eax
je 0x481504
mov eax, dword [ebp + 0x38]
cmp eax, ebx
jle 0x4813a4
mov dword [esp + 0x1c], eax
cmp dword [esp + 0x84], 0
mov esi, dword [esp + 0x80]
jne 0x481463
cmp word [edi], 0x71
je 0x4813d1
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x18], edx
mov dword [esp + 0x7c], eax
jmp 0x481428
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x20]
test eax, eax
js 0x4813f4
cmp eax, ecx
je 0x481408
cmp dword [esp + 0x7c], 0
jge 0x4813ec
mov dword [esp + 0x7c], eax
mov dword [esp + 0x18], 0xffffffff
test ecx, ecx
js 0x481408
mov eax, dword [esp + 0x14]
test eax, eax
jns 0x48140c
mov eax, ecx
mov dword [esp + 0x14], eax
jmp 0x48140c
mov eax, dword [esp + 0x14]
mov ecx, eax
xor ecx, dword [esp + 0x7c]
test ecx, 0xdfffffff
je 0x481424
mov dword [esp + 0x7c], 0xffffffff
jmp 0x481428
or dword [esp + 0x7c], eax
cmp dword [esp + 0x64], 0
je 0x481463
mov eax, dword [esp + 0x54]
xor edx, edx
push ebp
shr eax, 0xb
push edx
and eax, 1
push eax
push edi
mov word [esi], dx
call fcn.0047b130
add esp, 0x10
cmp eax, 0xfffffffd
jne 0x481458
mov dword [ebp + 0x5c], 1
jmp 0x481463
test eax, eax
js 0x4814cd
mov ecx, dword [esp + 0x24]
mov word [ecx], ax
mov ebx, dword [esp + 0x10]
cmp word [ebx], 0x7c
jne 0x481518
cmp dword [esp + 0x84], 0
je 0x48149e
mov edx, dword [esp + 0x58]
mov esi, dword [edx]
add esi, dword [esp + 0x30]
add dword [esp + 0x6c], 2
mov eax, dword [esp + 0x34]
add ebx, 2
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x1c]
jmp 0x48131d
mov ecx, esi
sub ecx, edi
mov eax, 0x71
mov word [esi], ax
mov eax, dword [esp + 0x34]
sar ecx, 1
mov word [esi + 2], cx
mov edi, esi
mov dword [esp + 0x4c], esi
add esi, 4
add ebx, 2
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x1c]
jmp 0x48131d
cmp eax, 0xfffffffe
jne 0x4814f1
mov ecx, dword [esp + 0x60]
mov edx, dword [esp + 0x10]
pop edi
mov eax, 0x24
mov dword [ecx], eax
mov eax, dword [esp + 0x58]
pop esi
pop ebp
mov dword [eax], edx
xor eax, eax
pop ebx
add esp, 0x40
ret
mov ecx, dword [esp + 0x60]
sub eax, 0xfffffffc
neg eax
sbb eax, eax
and eax, 0xffffffd3
add eax, 0x46
mov dword [ecx], eax
mov eax, dword [esp + 0x5c]
mov edx, dword [esp + 0x10]
pop edi
pop esi
pop ebp
mov dword [eax], edx
xor eax, eax
pop ebx
add esp, 0x40
ret
mov ecx, dword [esp + 0x84]
test ecx, ecx
jne 0x48154c
mov ecx, esi
sub ecx, edi
sar ecx, 1
lea esp, [esp]
movzx eax, word [edi + 2]
mov edx, eax
neg edx
mov word [edi + 2], cx
mov ecx, eax
lea edi, [edi + edx*2]
test eax, eax
jg 0x481530
mov ecx, dword [esp + 0x84]
mov edi, dword [esp + 0x38]
mov edx, esi
sub edx, edi
mov eax, 0x72
sar edx, 1
mov word [esi], ax
mov word [esi + 2], dx
add esi, 4
cmp dword [esp + 0x28], 0
jle 0x4815c5
mov eax, dword [ebp + 0x20]
cmp word [eax + 6], 0
je 0x4815bd
mov ecx, esi
sub ecx, edi
and ecx, 0xfffffffe
push ecx
lea edx, [edi + 4]
push edi
push edx
call fcn.0048dd80
mov ecx, dword [esp + 0x48]
mov eax, 0x7b
mov word [edi], ax
lea eax, [esi + 4]
sub eax, edi
sar eax, 1
mov word [ecx], ax
mov ecx, dword [esp + 0x90]
mov edx, 0x72
mov word [esi + 4], dx
mov word [esi + 6], ax
add esp, 0xc
add esi, 8
add dword [esp + 0x6c], 4
mov eax, dword [ebp + 0x20]
mov edx, dword [eax]
mov dword [ebp + 0x20], edx
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x58]
mov dword [ebp + 0x38], eax
mov eax, dword [esp + 0x5c]
mov dword [edx], esi
mov edx, dword [esp + 0x74]
mov dword [eax], ebx
mov eax, dword [esp + 0x18]
mov dword [edx], eax
mov edx, dword [esp + 0x78]
mov eax, dword [esp + 0x7c]
mov dword [edx], eax
test ecx, ecx
je 0x481619
mov eax, dword [ecx]
mov edx, dword [esp + 0x6c]
mov esi, 0x7fffffeb
sub esi, eax
cmp esi, edx
jge 0x481615
mov ecx, dword [esp + 0x60]
pop edi
pop esi
pop ebp
mov dword [ecx], 0x14
xor eax, eax
pop ebx
add esp, 0x40
ret
add eax, edx
mov dword [ecx], eax
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x40
ret