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

Disassembly:
sub esp, 0x64
push ebx
push ebp
push esi
push edi
mov edi, ecx
push 0
push 1
lea ecx, [esp + 0x38]
mov dword [esp + 0x78], edi
call fcn.00537020
mov esi, dword [esp + 0x78]
test esi, esi
je 0x50481c
cmp byte [esi], 0
je 0x50481c
mov dword [esp + 0x10], 0x70f0d4
mov eax, 0x70f0d4
mov ecx, 1
lock xadd dword [eax], ecx
mov edi, dword [esp + 0x7c]
lea esp, [esp]
mov al, byte [esi]
xor ebp, ebp
test al, al
je 0x5040d5
cmp al, 0x25
je 0x5040d5
mov al, byte [esi + ebp + 1]
inc ebp
test al, al
jne 0x5040c8
mov ecx, dword [0x7170d4]
test ecx, ecx
je 0x504111
mov edx, dword [ecx]
mov edx, dword [edx + 0xc]
push 0
push ebp
push esi
lea eax, [esp + 0x40]
push eax
call edx
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x14]
call fcn.005003f0
mov ecx, dword [esp + 0x34]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x504143
mov eax, dword [esp + 0x34]
push eax
jmp 0x50413b
push ebp
push esi
call fcn.004ff3e0
add esp, 8
lea ecx, [esp + 0x3c]
mov ebx, eax
push ecx
lea ecx, [esp + 0x14]
mov dword [esp + 0x40], ebx
call fcn.005003f0
mov edx, ebx
or eax, 0xffffffff
lock xadd dword [edx], eax
jne 0x504143
push ebx
call fcn.005057e0
add esp, 4
add esi, ebp
cmp byte [esi], 0
je 0x5047d1
mov al, byte [esi + 1]
mov ebp, esi
inc esi
test al, al
je 0x504789
cmp al, 0x25
jne 0x50417a
push ecx
mov eax, esp
mov ecx, 0x25
mov word [eax], cx
lea ecx, [esp + 0x14]
call fcn.00500530
inc esi
jmp 0x5040c0
xor ecx, ecx
mov dword [esp + 0x14], ecx
movsx eax, byte [esi]
add eax, 0xffffffe0
cmp eax, 0x10
ja case.0x504192.33
movzx edx, byte [eax + 0x504890]
jmp dword [edx*4 + 0x504874]
or ecx, 1
inc esi
jmp 0x504180
or ecx, 2
inc esi
jmp 0x504180
or ecx, 4
inc esi
jmp 0x504180
or ecx, 8
inc esi
jmp 0x504180
or ecx, 0x10
inc esi
jmp 0x504180
or ecx, 0x20
inc esi
jmp 0x504180
mov al, byte [esi]
mov dword [esp + 0x14], ecx
test al, al
je 0x50479f
mov cl, al
or ebx, 0xffffffff
sub cl, 0x30
mov dword [esp + 0x1c], ebx
cmp cl, 9
ja 0x50426e
mov dword [esp + 0x20], 0x70f0d4
mov edx, 0x70f0d4
mov eax, 1
lock xadd dword [edx], eax
mov al, byte [esi]
test al, al
je 0x504224
mov cl, al
sub cl, 0x30
cmp cl, 9
ja 0x504224
push ecx
movzx dx, al
mov ecx, esp
mov word [ecx], dx
lea ecx, [esp + 0x24]
mov byte [esp + 0x7c], al
inc esi
call fcn.00500530
mov al, byte [esi]
test al, al
jne 0x5041fc
push 0xa
push 0
lea ecx, [esp + 0x28]
call fcn.004ff4f0
cmp edx, ebx
jl 0x50424b
jg 0x50423e
cmp eax, 0x80000000
jb 0x50424b
test edx, edx
jl 0x504251
jg 0x50424b
cmp eax, 0x7fffffff
jbe 0x504251
xor eax, eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x20]
lock xadd dword [eax], ebx
jne 0x504284
mov ecx, dword [esp + 0x20]
push ecx
call fcn.005057e0
add esp, 4
jmp 0x504284
cmp al, 0x2a
jne 0x504284
mov eax, dword [edi]
add edi, 4
mov dword [esp + 0x1c], eax
test eax, eax
jge 0x504283
mov dword [esp + 0x1c], ebx
inc esi
mov al, byte [esi]
test al, al
je 0x5047a9
or ebx, 0xffffffff
mov dword [esp + 0x28], ebx
cmp al, 0x2e
jne 0x504350
mov al, byte [esi + 1]
inc esi
mov dl, al
sub dl, 0x30
cmp dl, 9
ja 0x504337
mov dword [esp + 0x38], 0x70f0d4
mov eax, 0x70f0d4
mov ecx, 1
lock xadd dword [eax], ecx
mov al, byte [esi]
test al, al
je 0x5042f8
jmp 0x5042d0
mov dl, al
sub dl, 0x30
cmp dl, 9
ja 0x5042f8
mov byte [esp + 0x7c], al
push ecx
movzx ax, al
mov ecx, esp
mov word [ecx], ax
lea ecx, [esp + 0x3c]
inc esi
call fcn.00500530
mov al, byte [esi]
test al, al
jne 0x5042d0
push 0xa
push 0
lea ecx, [esp + 0x40]
call fcn.004ff4f0
cmp edx, 0xffffffff
jl 0x504320
jg 0x504313
cmp eax, 0x80000000
jb 0x504320
test edx, edx
jl 0x504326
jg 0x504320
cmp eax, 0x7fffffff
jbe 0x504326
xor eax, eax
mov dword [esp + 0x2c], eax
mov ebx, eax
lea ecx, [esp + 0x38]
mov dword [esp + 0x28], ebx
call fcn.00401110
jmp 0x504350
cmp al, 0x2a
jne 0x504350
mov ebx, dword [edi]
add edi, 4
mov dword [esp + 0x28], ebx
test ebx, ebx
jge 0x50434f
or ebx, 0xffffffff
mov dword [esp + 0x28], ebx
inc esi
mov cl, byte [esi]
test cl, cl
je 0x5047b4
movsx ecx, cl
add ecx, 0xffffffb4
xor eax, eax
cmp ecx, 0x2e
ja case.0x50436e.77
movzx ecx, byte [ecx + 0x5048c0]
jmp dword [ecx*4 + 0x5048a4]
inc esi
cmp byte [esi], 0x68
jne 0x504382
mov eax, 1
jmp 0x5043b7
mov eax, 2
jmp case.0x50436e.77
inc esi
cmp byte [esi], 0x6c
jne 0x504396
mov eax, 4
jmp 0x5043b7
mov eax, 3
jmp case.0x50436e.77
mov eax, 5
jmp 0x5043b7
mov eax, 6
jmp 0x5043b7
mov eax, 7
jmp 0x5043b7
mov eax, 8
inc esi
cmp byte [esi], 0
je 0x5047bf
mov dword [esp + 0x18], 0x70f0d4
mov edx, 0x70f0d4
mov ecx, 1
lock xadd dword [edx], ecx
mov dl, byte [esi]
movsx ecx, dl
add ecx, 0xffffffbf
cmp ecx, 0x37
ja case.0x5043ef.66
movzx ecx, byte [ecx + 0x504910]
jmp dword [ecx*4 + 0x5048f0]
cmp eax, 8
ja case.0x5043fb.5
jmp dword [eax*4 + 0x504948]
mov eax, dword [edi]
add edi, 4
cdq
jmp 0x50441f
mov eax, dword [edi]
mov edx, dword [edi + 4]
add edi, 8
jmp 0x50441f
mov eax, dword [edi]
add edi, 4
jmp 0x50441d
xor eax, eax
xor edx, edx
mov ecx, dword [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x20]
push ecx
push 0xa
push ebx
push edx
push eax
lea edx, [esp + 0x58]
push edx
lea ecx, [esp + 0x4c]
call fcn.00534be0
mov ecx, eax
call fcn.00536440
push eax
lea ecx, [esp + 0x1c]
call fcn.004fc970
lea ecx, [esp + 0x40]
call fcn.00401110
jmp 0x5046d5
cmp eax, 7
ja case.0x504460.5
jmp dword [eax*4 + 0x50496c]
mov ebp, dword [edi]
add edi, 4
jmp 0x50447a
mov ebp, dword [edi]
mov ebx, dword [edi + 4]
add edi, 8
jmp 0x50447c
xor ebp, ebp
xor ebx, ebx
mov al, dl
sub al, 0x41
cmp al, 0x19
ja 0x504489
or dword [esp + 0x14], 0x40
push edx
mov dword [esp + 0x28], 0xa
call fcn.004fee90
add esp, 4
cmp al, 0x6f
je 0x5044ba
cmp al, 0x75
je 0x5044b0
cmp al, 0x78
jne 0x5044c2
mov dword [esp + 0x24], 0x10
jmp 0x5044c2
mov dword [esp + 0x24], 0xa
jmp 0x5044c2
mov dword [esp + 0x24], 8
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x2c]
push edx
push eax
push ecx
push ebx
push ebp
lea edx, [esp + 0x5c]
push edx
lea ecx, [esp + 0x4c]
call fcn.00534be0
mov ecx, eax
call fcn.005364b0
push eax
lea ecx, [esp + 0x1c]
call fcn.004fc970
lea ecx, [esp + 0x44]
call fcn.00401110
jmp 0x5046d5
fld qword [edi]
add edi, 8
mov al, dl
fstp qword [esp + 0x28]
sub al, 0x41
cmp al, 0x19
ja 0x50451b
or dword [esp + 0x14], 0x40
push edx
mov ebp, 1
call fcn.004fee90
movsx eax, al
add eax, 0xffffff9f
add esp, 4
cmp eax, 6
ja case.0x504534.97
jmp dword [eax*4 + 0x50498c]
xor ebp, ebp
jmp case.0x504534.97
mov ebp, 2
mov ecx, dword [esp + 0x14]
fld qword [esp + 0x28]
mov edx, dword [esp + 0x1c]
push ecx
push edx
push ebp
push ebx
sub esp, 8
lea eax, [esp + 0x60]
fstp qword [esp]
push eax
lea ecx, [esp + 0x4c]
call fcn.00534be0
mov ecx, eax
call fcn.005363b0
push eax
lea ecx, [esp + 0x1c]
call fcn.004fc970
lea ecx, [esp + 0x48]
call fcn.00401110
jmp 0x5046d5
add edi, 4
cmp eax, 3
jne 0x5045ab
mov cx, word [edi - 4]
mov word [esp + 0x4c], cx
mov edx, dword [esp + 0x4c]
push edx
lea ecx, [esp + 0x1c]
call fcn.00500390
jmp 0x5046d5
mov al, byte [edi - 4]
push ecx
movzx ax, al
mov ecx, esp
mov word [ecx], ax
lea ecx, [esp + 0x1c]
call fcn.00500390
jmp 0x5046d5
mov ecx, dword [edi]
add edi, 4
cmp eax, 3
jne 0x5045fa
cmp word [ecx], 0
mov eax, ecx
je 0x5045e9
jmp 0x5045e0
add eax, 2
cmp word [eax], 0
jne 0x5045e0
sub eax, ecx
sar eax, 1
push eax
push ecx
lea ecx, [esp + 0x20]
call fcn.00503c70
jmp 0x50461d
push 0xffffffffffffffff
push ecx
lea edx, [esp + 0x58]
push edx
call fcn.00500be0
add esp, 0xc
push eax
lea ecx, [esp + 0x1c]
call fcn.004fc970
lea ecx, [esp + 0x50]
call fcn.00401110
cmp ebx, 0xffffffff
je 0x5046d5
push ebx
lea ecx, [esp + 0x1c]
call fcn.00502f30
jmp 0x5046d5
mov ebp, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
mov eax, dword [edi]
or ebp, 1
push ebp
push edx
push 0x10
push ebx
xor ecx, ecx
push ecx
add edi, 4
push eax
lea eax, [esp + 0x6c]
push eax
lea ecx, [esp + 0x4c]
mov dword [esp + 0x30], ebp
call fcn.00534be0
mov ecx, eax
call fcn.005364b0
push eax
lea ecx, [esp + 0x1c]
call fcn.004fc970
lea ecx, [esp + 0x54]
call fcn.00401110
jmp 0x5046d5
dec eax
cmp eax, 3
ja case.0x504682.3
jmp dword [eax*4 + 0x5049a8]
mov ecx, dword [esp + 0x10]
mov eax, dword [edi]
mov ecx, dword [ecx + 8]
add edi, 4
mov byte [eax], cl
jmp 0x5046d5
mov edx, dword [esp + 0x10]
mov eax, dword [edi]
mov ecx, dword [edx + 8]
add edi, 4
mov word [eax], cx
jmp 0x5046d5
mov ecx, dword [esp + 0x10]
mov ecx, dword [ecx + 8]
mov eax, dword [edi]
add edi, 4
mov dword [esp + 0x28], ecx
mov edx, dword [esp + 0x28]
mov dword [eax + 4], 0
jmp 0x5046d3
mov ecx, dword [esp + 0x10]
mov eax, dword [edi]
mov edx, dword [ecx + 8]
add edi, 4
mov dword [eax], edx
mov edx, dword [esp + 0x1c]
push 0
push ecx
mov eax, esp
mov ecx, 0x20
inc esi
test byte [esp + 0x1c], 4
mov word [eax], cx
push edx
lea ecx, [esp + 0x24]
je 0x50471e
lea eax, [esp + 0x64]
push eax
call fcn.00502fc0
push eax
lea ecx, [esp + 0x14]
call fcn.005003f0
lea ecx, [esp + 0x58]
call fcn.00401110
lea ecx, [esp + 0x18]
call fcn.00401110
jmp 0x5040c0
lea eax, [esp + 0x68]
push eax
call fcn.005030e0
push eax
lea ecx, [esp + 0x14]
call fcn.005003f0
lea ecx, [esp + 0x5c]
call fcn.00401110
lea ecx, [esp + 0x18]
call fcn.00401110
jmp 0x5040c0
cmp ebp, esi
je 0x504769
lea ecx, [ecx]
push ecx
movzx cx, byte [ebp]
mov eax, esp
mov word [eax], cx
lea ecx, [esp + 0x14]
call fcn.00500530
inc ebp
cmp ebp, esi
jne 0x504750
mov edx, 0x70f0d4
or eax, 0xffffffff
lock xadd dword [edx], eax
jne 0x5040c0
push edx
call fcn.005057e0
add esp, 4
jmp 0x5040c0
push ecx
mov eax, esp
mov ecx, 0x25
mov word [eax], cx
lea ecx, [esp + 0x14]
call fcn.00500530
jmp 0x5047d1
mov dword [esp + 0x60], ebp
lea edx, [esp + 0x60]
jmp 0x5047c7
lea eax, [esp + 0x64]
mov dword [esp + 0x64], ebp
push eax
jmp 0x5047c8
lea ecx, [esp + 0x68]
mov dword [esp + 0x68], ebp
push ecx
jmp 0x5047c8
mov dword [esp + 0x6c], ebp
lea edx, [esp + 0x6c]
push edx
lea ecx, [esp + 0x14]
call fcn.005004b0
mov esi, dword [esp + 0x10]
mov eax, esi
mov ecx, 1
lock xadd dword [eax], ecx
mov edi, dword [esp + 0x70]
mov edx, dword [edi]
or eax, 0xffffffff
lock xadd dword [edx], eax
jne 0x5047fa
mov ecx, dword [edi]
push ecx
call fcn.005057e0
add esp, 4
mov dword [edi], esi
mov edx, esi
or eax, 0xffffffff
lock xadd dword [edx], eax
jne 0x504868
push esi
call fcn.005057e0
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 8
mov ecx, 0x70f0e8
mov edx, 1
lock xadd dword [ecx], edx
mov eax, ecx
mov ecx, 1
lock xadd dword [eax], ecx
mov edx, dword [edi]
or eax, 0xffffffff
lock xadd dword [edx], eax
jne 0x50484b
mov ecx, dword [edi]
push ecx
call fcn.005057e0
add esp, 4
mov dword [edi], 0x70f0e8
mov edx, 0x70f0e8
or eax, 0xffffffff
lock xadd dword [edx], eax
jne 0x504868
push edx
call fcn.005057e0
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 8