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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x16c
mov eax, dword [0x57a040]
xor eax, esp
mov dword [esp + 0x168], eax
push ebx
push esi
push edi
mov edi, ecx
mov ebx, edx
mov dword [esp + 0x10], ebx
mov esi, dword [edi*4 + 0x20a514c]
cmp word [esi + 0x78], 1
jne 0x522997
lea ecx, [edi + edi*4]
mov ebx, dword [ecx*8 + 0xcd73c4]
test ebx, ebx
js 0x522993
cmp ebx, 0x1194
jge 0x522993
mov eax, dword [ebx*4 + 0x20a514c]
cmp word [eax + 0xcc], 4
jne 0x522993
cmp dword [ecx*8 + 0xcd73d0], 0
je 0x522993
mov dword [ecx*8 + 0xcd73d0], 0
lea edx, [esp + 0x60]
push 7
mov ecx, ebx
mov dword [esp + 0x64], 0xa707c1
mov word [esp + 0x68], 0xff00
mov byte [esp + 0x6a], 0xff
call fcn.00526480
add esp, 4
mov ebx, dword [esp + 0x10]
cmp word [esi + 0x5ea], 0
je 0x522a27
xor eax, eax
mov dword [esp + 0x1c], 0x110
mov word [esi + 0x5ea], ax
mov ecx, 0xa9b83c
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x64]
push eax
call fcn.00405650
mov eax, dword [esp + 0x68]
mov ecx, dword [0xa9b83c]
cmp byte [eax + 0xd], 0
jne 0x5229e3
cmp dword [eax + 0x10], 0x110
jle 0x5229e5
mov eax, ecx
cmp eax, ecx
jne 0x522a08
push 0x110
push str.Could_not_find_message__d_
push 0xa9b7bc
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov eax, 0xa9b7bc
jmp 0x522a0b
add eax, 0x18
push eax
push 0
push 0
push 0
push 0
push 0
push 1
push dword [esi]
push 0xb90558
call fcn.004cdc70
add esp, 0x24
mov cl, byte [esi + 0x149]
cmp cl, 0xb
jb 0x522a7d
cmp cl, 0x11
jbe 0x522a4c
cmp cl, 0x34
jne 0x522a7d
xor eax, eax
cmp cl, cl
sete al
lea eax, [eax*8 - 1]
jmp 0x522a52
movzx eax, cl
sub eax, 0xb
test eax, eax
js 0x522a72
cmp eax, 8
jge 0x522a72
imul eax, eax, 0x69c
cmp dword [eax + 0x57b098], 3
jne 0x522a72
push edi
call fcn.0040fa90
jmp 0x522a7d
push edi
mov ecx, 0x57b090
call fcn.0040fc50
mov al, byte [esi + 0x149]
cmp al, 0x2d
jb 0x522ac0
cmp al, 0x32
ja 0x522ac0
movzx eax, al
lea ecx, [eax - 0x2d]
cmp eax, 0x2d
jl 0x522ab5
cmp ecx, 6
jge 0x522ab5
add eax, 0xffffffd3
imul eax, eax, 0x2ac
cmp dword [eax + 0x9d2b70], 3
jne 0x522ab5
push edi
call fcn.0048c1e0
jmp 0x522ac0
push edi
mov ecx, 0x9d2b68
call fcn.0048c3a0
cmp byte [esi + 0x217], 0
jne 0x522c04
lea eax, [esp + 0x28]
push eax
push ebx
call fcn.00484b30
test al, al
je 0x522c04
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x2c]
push eax
push ebx
call fcn.00484ba0
test al, al
je 0x522c04
cmp byte [esi + 0x400], 0
mov ebx, dword [esp + 0x14]
je 0x522b34
mov al, byte [esi + 0x149]
cmp al, 0x1e
jne 0x522b27
test ebx, ebx
jmp 0x522b2e
test al, al
jne 0x522b34
cmp ebx, 0x1e
je 0x522c04
cmp dword [esi + 0x758], 0
jne 0x522ce8
lea eax, [esp + 0x14]
mov dword [esp + 0x14], ebx
push eax
lea eax, [esp + 0x64]
mov ecx, 0x9f436c
push eax
call fcn.00405650
mov eax, dword [esp + 0x68]
mov ecx, dword [0x9f436c]
cmp byte [eax + 0xd], 0
jne 0x522b6e
cmp ebx, dword [eax + 0x10]
jge 0x522b70
mov eax, ecx
cmp eax, ecx
je 0x522ce8
xor ecx, ecx
cmp dword [eax + 0x3c], 0xffffffff
cmovne ecx, dword [eax + 0x3c]
test ecx, ecx
je 0x522ce8
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0xe5
push eax
lea eax, [esp + 0x64]
mov ecx, 0xa9b83c
push eax
call fcn.00405650
mov eax, dword [esp + 0x68]
mov ecx, dword [0xa9b83c]
cmp byte [eax + 0xd], 0
jne 0x522bbf
cmp dword [eax + 0x10], 0xe5
jle 0x522bc1
mov eax, ecx
cmp eax, ecx
jne 0x522be5
mov eax, dword [sym.imp.USER32.dll_wsprintfA]
push 0xe5
push str.Could_not_find_message__d_
push 0xa9b7bc
call eax
add esp, 0xc
mov eax, 0xa9b7bc
jmp 0x522be8
add eax, 0x18
push eax
push 0
push 0
push 0
push 0
push 0
push 1
push dword [esi]
push 0xb90558
call fcn.004cdc70
add esp, 0x24
mov ecx, dword [esi]
lea edx, [esp + 0x70]
mov eax, ecx
mov byte [esp + 0x15], cl
shr eax, 8
mov ecx, esi
mov byte [esp + 0x14], al
mov ax, word [esp + 0x14]
push 6
mov word [esp + 0x78], ax
mov dword [esp + 0x74], 0x11406c1
call fcn.005264a0
mov ecx, dword [esp + 0x14]
add esp, 4
test ecx, ecx
movzx eax, cx
mov edx, 1
mov word [esp + 0x60], 0xac3
cmovg eax, edx
mov byte [esp + 0x62], 0x1c
mov word [esp + 0x64], ax
mov al, byte [esi + 0x149]
mov byte [esp + 0x66], al
mov al, byte [esi + 0x144]
mov byte [esp + 0x67], al
mov al, byte [esi + 0x146]
mov byte [esp + 0x68], al
mov al, byte [esi + 0x148]
mov byte [esp + 0x69], al
lea eax, [esp + 0x60]
push 0xa
push eax
push edi
call fcn.005192f0
mov ecx, esi
call fcn.00520340
mov ecx, esi
call fcn.005202c0
push esi
call fcn.004d3660
push esi
call fcn.004933b0
mov al, byte [esi + 0x149]
mov byte [esi + 0x218], al
mov al, byte [esi + 0x144]
mov byte [esi + 0x219], al
mov al, byte [esi + 0x146]
mov byte [esi + 0x21a], al
mov byte [esi + 0x217], 1
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x168]
xor ecx, esp
call fcn.00529f01
mov esp, ebp
pop ebp
ret
cmp ebx, 0xb
jl 0x522cfe
cmp ebx, 0x11
jle 0x522d56
xor eax, eax
cmp ebx, 0x34
sete al
test eax, eax
jne 0x522d56
cmp ebx, 0x12
jl 0x522d14
cmp ebx, 0x17
jle 0x522d56
xor eax, eax
cmp ebx, 0x35
sete al
test eax, eax
jne 0x522d56
cmp ebx, 9
je 0x522d56
xor eax, eax
cmp ebx, 0x20
sete al
test eax, eax
jne 0x522d56
cmp ebx, 0x2d
jl 0x522d34
cmp ebx, 0x32
setle al
test eax, eax
jne 0x522d56
cmp ebx, 0x41
jl 0x522d45
xor eax, eax
cmp ebx, 0x44
setle al
test eax, eax
jne 0x522d56
cmp ebx, 0x45
jl 0x522d5e
xor eax, eax
cmp ebx, 0x48
setle al
test eax, eax
je 0x522d5e
push 3
push esi
call fcn.004774b0
cmp dword [esp + 0x18], 0x61
jne 0x522da3
cmp dword [0x5d8fb0], 7
jne 0x522d89
mov al, byte [esi + 0xdca]
cmp al, 1
je 0x522da3
cmp dword [0x5d9150], 0
je 0x522c04
test al, al
jmp 0x522d9d
push dword [esi]
call fcn.0041f4d0
test eax, eax
jne 0x522da3
push dword [esi]
call fcn.0041f5c0
test eax, eax
je 0x522c04
cmp ebx, 7
jne 0x522e6c
mov eax, dword [esi + 0x390]
movzx eax, word [eax + 0x864]
mov ecx, eax
test ax, ax
js 0x522f27
mov eax, 0x2000
cmp cx, ax
jge 0x522f27
mov eax, 0x1a02
cmp cx, ax
je 0x522dea
mov eax, 0x1a03
cmp cx, ax
jne 0x522f27
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0x112
push eax
lea eax, [esp + 0x64]
mov ecx, 0xa9b83c
push eax
call fcn.00405650
mov eax, dword [esp + 0x68]
mov ecx, dword [0xa9b83c]
cmp byte [eax + 0xd], 0
jne 0x522e1f
cmp dword [eax + 0x10], 0x112
jle 0x522e21
mov eax, ecx
cmp eax, ecx
jne 0x522e56
mov eax, dword [sym.imp.USER32.dll_wsprintfA]
push 0x112
push str.Could_not_find_message__d_
push 0xa9b7bc
call eax
add esp, 0xc
mov eax, 0xa9b7bc
push eax
push 0
push 0
push 0
push 0
push 0
push 1
push edi
jmp 0x522bf7
add eax, 0x18
push eax
push 0
push 0
push 0
push 0
push 0
push 1
push edi
jmp 0x522bf7
cmp ebx, 0xa
je 0x522e7a
cmp ebx, 0x27
jne 0x522f27
mov ecx, dword [esi + 0x390]
movzx eax, word [ecx + 0x758]
mov edx, eax
test ax, ax
js 0x522e9c
mov eax, 0x2000
cmp dx, ax
jl 0x522f27
movzx eax, word [ecx + 0x864]
mov ecx, 0x1a03
cmp ax, cx
je 0x522f27
mov ecx, 0x1a25
cmp ax, cx
je 0x522f27
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0x113
push eax
lea eax, [esp + 0x64]
mov ecx, 0xa9b83c
push eax
call fcn.00405650
mov eax, dword [esp + 0x68]
mov ecx, dword [0xa9b83c]
cmp byte [eax + 0xd], 0
jne 0x522eec
cmp dword [eax + 0x10], 0x113
jle 0x522eee
mov eax, ecx
cmp eax, ecx
jne 0x522e56
mov eax, dword [sym.imp.USER32.dll_wsprintfA]
push 0x113
push str.Could_not_find_message__d_
push 0xa9b7bc
call eax
add esp, 0xc
mov eax, 0xa9b7bc
push eax
push 0
push 0
push 0
push 0
push 0
push 1
push edi
jmp 0x522bf7
mov al, byte [esi + 0x149]
cmp al, 0x18
jb 0x522f39
cmp al, 0x1d
jbe 0x522f46
cmp al, 0x24
je 0x522f46
movzx eax, al
cmp eax, ebx
je 0x522f46
push edi
call fcn.004ad010
mov al, byte [esi + 0x149]
cmp al, 0x18
jb 0x522f65
cmp al, 0x1d
jbe 0x522f58
cmp al, 0x24
jne 0x522f65
movzx eax, al
cmp eax, ebx
je 0x522f65
push edi
call fcn.004ad010
cmp ebx, 0x3a
jne 0x52309f
mov eax, dword [0xbcd08c]
cmp eax, 7
je 0x52302f
cmp eax, 8
je 0x52302f
cmp eax, 9
je 0x52302f
cmp eax, 0xa
je 0x52302f
mov ecx, dword [esp + 0x10]
cmp ecx, 0x122
jne 0x52310d
mov ecx, edi
mov dword [esp + 0x14], ecx
test edi, edi
js 0x523109
cmp edi, 0x1194
jge 0x523109
mov eax, dword [edi*4 + 0x20a514c]
cmp dword [eax + 4], 3
jne 0x523109
movzx edx, word [eax + 0x78]
cmp edx, 1
je 0x522fe4
cmp edx, 6
jne 0x523109
cmp byte [eax + 0xa], 0
jg 0x523109
cmp byte [eax + 0x9c0], 0
jne 0x523109
mov eax, dword [0xbcd218]
cmp eax, dword [0xbcd21c]
je 0x523016
mov dword [eax], edi
add dword [0xbcd218], 4
jmp 0x5230e1
lea ecx, [esp + 0x14]
push ecx
push eax
mov ecx, 0xbcd214
call fcn.00422ac0
mov ecx, dword [esp + 0x14]
jmp 0x5230e1
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0x145
push eax
lea eax, [esp + 0x64]
mov ecx, 0xa9b83c
push eax
call fcn.00405650
mov eax, dword [esp + 0x68]
mov ecx, dword [0xa9b83c]
cmp byte [eax + 0xd], 0
jne 0x523064
cmp dword [eax + 0x10], 0x145
jle 0x523066
mov eax, ecx
cmp eax, ecx
jne 0x522e56
mov eax, dword [sym.imp.USER32.dll_wsprintfA]
push 0x145
push str.Could_not_find_message__d_
push 0xa9b7bc
call eax
add esp, 0xc
mov eax, 0xa9b7bc
push eax
push 0
push 0
push 0
push 0
push 0
push 1
push edi
jmp 0x522bf7
cmp ebx, 0x39
jne 0x523109
cmp dword [esp + 0x10], 0x124
jne 0x5230df
mov eax, dword [0xbcd08c]
cmp eax, 7
je 0x522c04
cmp eax, 8
je 0x522c04
cmp eax, 9
je 0x522c04
cmp eax, 0xa
je 0x522c04
push edi
call fcn.004f4d50
jmp 0x523109
mov ecx, edi
mov al, byte [0xbcd08c]
lea edx, [esp + 0x60]
mov byte [esp + 0x64], al
mov al, byte [0xbcd0c4]
push 6
mov dword [esp + 0x64], 0x11d106c1
mov byte [esp + 0x69], al
call fcn.00526480
add esp, 4
mov ecx, dword [esp + 0x10]
test byte [esi + 0x384], 3
jne 0x523328
cmp byte [esi + 0x216], 0
jne 0x523328
movzx eax, byte [esi + 0x149]
mov dword [esi + 0x200], 0x20
cmp eax, ebx
je 0x523190
movzx eax, word [esi + 0x9ca]
push eax
push ebx
push edi
call fcn.004b5840
movzx edx, ax
movsx eax, dx
cmp eax, dword [0xbda7bc]
je 0x523190
cmp dx, 0xffff
je 0x522cd1
push dword [esp + 0x1c]
mov ecx, edi
push dword [esp + 0x24]
push ebx
call fcn.004ac8f0
add esp, 0xc
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x168]
xor ecx, esp
call fcn.00529f01
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x718], 0
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
mov word [esi + 0x146], ax
mov word [esi + 0x168], ax
mov al, byte [esp + 0x24]
mov word [esi + 0x144], cx
mov word [esi + 0x166], cx
mov byte [esi + 0x149], bl
mov byte [esi + 0x148], al
mov dword [esi + 0x170], 0
mov byte [esi + 0x214], 0
mov byte [esi + 0x205], 0
mov dword [esi + 0x6c4], 0
mov dword [esi + 0x6c8], 0xffffffff
je 0x523238
push 0x10
lea eax, [esp + 0x64]
mov dword [esi + 0x718], 0
push eax
push dword [esi]
mov dword [esi + 0x71c], 0
mov dword [esp + 0x6c], 0x51bf10c1
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], 0
mov byte [esp + 0x78], 1
call fcn.005192f0
mov ecx, dword [esi]
lea edx, [esp + 0x70]
mov eax, ecx
mov byte [esp + 0x15], cl
shr eax, 8
mov ecx, esi
mov byte [esp + 0x14], al
mov ax, word [esp + 0x14]
push 6
mov word [esp + 0x78], ax
mov dword [esp + 0x74], 0x11406c1
call fcn.005264a0
mov ecx, dword [esp + 0x14]
add esp, 4
test ecx, ecx
movzx eax, cx
mov ebx, 1
mov word [esp + 0x60], 0xac3
cmovg eax, ebx
mov byte [esp + 0x62], 0x1c
mov word [esp + 0x64], ax
mov al, byte [esi + 0x149]
mov byte [esp + 0x66], al
mov al, byte [esi + 0x144]
mov byte [esp + 0x67], al
mov al, byte [esi + 0x146]
mov byte [esp + 0x68], al
mov al, byte [esi + 0x148]
mov byte [esp + 0x69], al
lea eax, [esp + 0x60]
push 0xa
push eax
push edi
call fcn.005192f0
mov ecx, esi
call fcn.00520340
mov ecx, esi
call fcn.005202c0
push esi
call fcn.004d3660
push esi
call fcn.004933b0
mov al, byte [esi + 0x149]
mov cl, byte [esi + 0x146]
mov byte [esi + 0x218], al
mov al, byte [esi + 0x144]
mov byte [esi + 0x219], al
mov byte [esi + 0x21a], cl
mov byte [esi + 0x217], bl
cmp word [esi + 0x78], bx
jne 0x523311
mov byte [esi + 0x5e0], 0xa
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x168]
xor ecx, esp
call fcn.00529f01
mov esp, ebp
pop ebp
ret
test ecx, ecx
movzx eax, cx
mov edx, 1
mov dword [esi + 0x200], 0x20
cmovg eax, edx
mov byte [esi + 0x217], 1
mov word [esp + 0x64], ax
mov al, byte [esi + 0x149]
mov byte [esp + 0x66], al
mov al, byte [esi + 0x144]
mov byte [esp + 0x67], al
mov al, byte [esi + 0x146]
mov byte [esp + 0x68], al
mov al, byte [esi + 0x148]
mov byte [esp + 0x69], al
lea eax, [esp + 0x60]
push 0xa
push eax
push edi
mov word [esp + 0x6c], 0xac3
mov byte [esp + 0x6e], 0x1c
call fcn.005192f0
mov ecx, dword [esp + 0x174]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00529f01
mov esp, ebp
pop ebp
ret