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

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x18
push 0
push 0
dec ecx
jne 0x42252d
push ecx
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov ebx, edx
mov dword [ebp - 4], eax
lea eax, [ebp - 8]
call fcn.004051f4
xor eax, eax
push ebp
push 0x1042257
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edi, dword [eax]
mov eax, dword [ebp + 8]
add dword [eax], 4
mov eax, edi
call fcn.00403250
mov esi, eax
mov dword [ebp - 0x14], esi
mov edx, dword [ebp + 8]
mov edx, dword [edx]
mov ecx, edi
mov eax, esi
call fcn.00406d98
mov eax, dword [esi]
mov dword [ebx + 4], eax
add esi, 4
mov eax, dword [esi]
mov dword [ebx], eax
add esi, 4
mov eax, dword [esi]
push eax
lea eax, [ebx + 0x90]
mov ecx, 1
mov edx, dword [0x103b438]
call fcn.00405b5c
add esp, 4
add esi, 4
lea eax, [ebx + 8]
mov edx, esi
call fcn.00404dec
mov eax, dword [ebx + 8]
call fcn.00404ee8
add eax, eax
add eax, 2
add esi, eax
mov al, byte [esi]
mov byte [ebx + 0x3c], al
inc esi
cmp dword [ebx], 1
jne 0x422837
cmp byte [ebx + 0x3c], 3
jne 0x422837
mov al, byte [0x1042268]
push eax
push 0
lea eax, [ebp - 0x40]
push eax
mov eax, dword [0x1049fe0]
mov eax, dword [eax]
mov ecx, dword [eax + 0x18]
mov edx, dword [0x104a110]
mov edx, dword [edx]
mov eax, dword [ebx + 8]
call fcn.00418dfc
mov edx, dword [ebp - 0x40]
lea eax, [ebx + 8]
call fcn.00404ce0
mov al, byte [0x1042268]
push eax
push 0
lea eax, [ebp - 0x44]
push eax
mov eax, dword [0x1049fe0]
mov eax, dword [eax]
mov ecx, dword [eax + 0x14]
mov edx, dword [0x104a110]
mov edx, dword [edx + 4]
mov eax, dword [ebx + 8]
call fcn.00418dfc
mov edx, dword [ebp - 0x44]
lea eax, [ebx + 8]
call fcn.00404ce0
mov al, byte [0x1042268]
push eax
push 0
lea eax, [ebp - 0x48]
push eax
mov eax, dword [0x1049fe0]
mov eax, dword [eax]
mov ecx, dword [eax + 0x10]
mov edx, dword [0x104a110]
mov edx, dword [edx + 8]
mov eax, dword [ebx + 8]
call fcn.00418dfc
mov edx, dword [ebp - 0x48]
lea eax, [ebx + 8]
call fcn.00404ce0
mov al, byte [0x1042268]
push eax
push 0
lea eax, [ebp - 0x4c]
push eax
mov eax, dword [0x1049fe0]
mov eax, dword [eax]
mov ecx, dword [eax + 0xc]
mov edx, dword [0x104a110]
mov edx, dword [edx + 0xc]
mov eax, dword [ebx + 8]
call fcn.00418dfc
mov edx, dword [ebp - 0x4c]
lea eax, [ebx + 8]
call fcn.00404ce0
mov al, byte [0x1042268]
push eax
push 0
lea eax, [ebp - 0x50]
push eax
mov eax, dword [0x1049fe0]
mov eax, dword [eax]
mov ecx, dword [eax + 0x24]
mov edx, dword [0x104a110]
mov edx, dword [edx + 0x10]
mov eax, dword [ebx + 8]
call fcn.00418dfc
mov edx, dword [ebp - 0x50]
lea eax, [ebx + 8]
call fcn.00404ce0
mov al, byte [0x1042268]
push eax
push 0
lea eax, [ebp - 0x54]
push eax
mov eax, dword [0x1049fe0]
mov eax, dword [eax]
mov ecx, dword [eax + 0x2c]
mov edx, dword [0x104a110]
mov edx, dword [edx + 0x14]
mov eax, dword [ebx + 8]
call fcn.00418dfc
mov edx, dword [ebp - 0x54]
lea eax, [ebx + 8]
call fcn.00404ce0
mov al, byte [0x1042268]
push eax
push 0
lea eax, [ebp - 0x58]
push eax
mov eax, dword [0x1049fe0]
mov eax, dword [eax]
mov ecx, dword [eax + 0x20]
mov edx, dword [0x104a110]
mov edx, dword [edx + 0x18]
mov eax, dword [ebx + 8]
call fcn.00418dfc
mov edx, dword [ebp - 0x58]
lea eax, [ebx + 8]
call fcn.00404ce0
mov al, byte [0x1042268]
push eax
push 0
lea eax, [ebp - 0x5c]
push eax
mov eax, dword [0x1049fe0]
mov eax, dword [eax]
mov ecx, dword [eax + 0x30]
mov edx, dword [0x104a110]
mov edx, dword [edx + 0x1c]
mov eax, dword [ebx + 8]
call fcn.00418dfc
mov edx, dword [ebp - 0x5c]
lea eax, [ebx + 8]
call fcn.00404ce0
mov al, byte [0x1042268]
push eax
push 0
lea eax, [ebp - 0x60]
push eax
mov eax, dword [0x1049fe0]
mov eax, dword [eax]
mov ecx, dword [eax + 0x34]
mov edx, dword [0x104a110]
mov edx, dword [edx + 0x20]
mov eax, dword [ebx + 8]
call fcn.00418dfc
mov edx, dword [ebp - 0x60]
lea eax, [ebx + 8]
call fcn.00404ce0
mov al, byte [0x1042268]
push eax
push 0
lea eax, [ebp - 0x64]
push eax
mov eax, dword [0x1049fe0]
mov eax, dword [eax]
mov ecx, dword [eax + 0x38]
mov edx, dword [0x104a110]
mov edx, dword [edx + 0x24]
mov eax, dword [ebx + 8]
call fcn.00418dfc
mov edx, dword [ebp - 0x64]
lea eax, [ebx + 8]
call fcn.00404ce0
mov al, byte [0x1042268]
push eax
push 0
lea eax, [ebp - 0x68]
push eax
mov eax, dword [0x1049fe0]
mov eax, dword [eax]
mov ecx, dword [eax + 0x3c]
mov edx, dword [0x104a110]
mov edx, dword [edx + 0x28]
mov eax, dword [ebx + 8]
call fcn.00418dfc
mov edx, dword [ebp - 0x68]
lea eax, [ebx + 8]
call fcn.00404ce0
mov al, byte [0x1042268]
push eax
push 0
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [0x1049fe0]
mov eax, dword [eax]
mov ecx, dword [eax + 0x40]
mov edx, dword [0x104a110]
mov edx, dword [edx + 0x2c]
mov eax, dword [ebx + 8]
call fcn.00418dfc
mov edx, dword [ebp - 0x6c]
lea eax, [ebx + 8]
call fcn.00404ce0
mov eax, dword [ebp - 8]
xor edx, edx
call fcn.00405000
je 0x422859
lea edx, [ebp - 0x70]
mov eax, dword [ebp - 8]
call fcn.00419024
mov edx, dword [ebp - 0x70]
lea eax, [ebp - 8]
call fcn.00404d04
lea eax, [ebp - 0x78]
mov ecx, dword [ebx + 8]
mov edx, dword [ebp - 8]
call fcn.00404f54
mov eax, dword [ebp - 0x78]
lea edx, [ebp - 0x74]
call fcn.00407f64
mov edx, dword [ebp - 0x74]
lea eax, [ebx + 0xc]
call fcn.00404ce0
lea edx, [ebp - 0x7c]
mov eax, dword [ebx + 0xc]
call fcn.00427c88
mov ecx, dword [ebp - 0x7c]
mov dl, 1
mov eax, dword [0x1046f28]
call fcn.004280d4
mov dword [ebx + 0x34], eax
lea edx, [ebp - 0x80]
mov eax, dword [ebx + 0xc]
call fcn.00427eb4
mov ecx, dword [ebp - 0x80]
mov dl, 1
mov eax, dword [0x1046f28]
call fcn.004280d4
mov dword [ebx + 0x38], eax
cmp byte [ebx + 0x3c], 2
jne 0x422a95
push 0x1042274
mov eax, 0x100000
call fcn.00403594
lea ecx, [ebp - 0x8c]
mov edx, 5
call fcn.0040828c
push dword [ebp - 0x8c]
push 0x1042280
lea eax, [ebp - 0x88]
mov edx, 3
call fcn.004049f0
mov edx, dword [ebp - 0x88]
lea eax, [ebp - 0x84]
call fcn.00404e5c
mov eax, dword [ebp - 0x84]
lea edx, [ebp - 0x18]
call fcn.00407f64
lea edx, [ebp - 0x94]
mov eax, dword [ebx + 0xc]
call fcn.00419118
mov eax, dword [ebp - 0x94]
lea edx, [ebp - 0x90]
call fcn.00419024
lea eax, [ebp - 0x90]
mov edx, dword [ebp - 0x18]
call fcn.00404ef4
mov eax, dword [ebp - 0x90]
call fcn.00419264
test al, al
jne 0x4228c1
mov eax, dword [ebp - 0x18]
call fcn.00404ee8
add eax, eax
push eax
mov eax, dword [ebp - 0x18]
call fcn.00404ed8
mov edx, eax
lea eax, [ebx + 0x10]
pop ecx
call fcn.00406d98
mov al, byte [esi]
mov byte [ebx + 0x45], al
inc esi
mov al, byte [esi]
mov byte [ebx + 0x44], al
inc esi
mov eax, dword [esi]
mov dword [ebx + 0x48], eax
mov eax, dword [esi + 4]
mov dword [ebx + 0x4c], eax
add esi, 8
mov edx, 0x1000
mov eax, dword [ebx + 0x48]
call fcn.0041c7c8
xor edx, edx
mov dword [ebx + 0x50], eax
mov dword [ebx + 0x54], edx
mov eax, dword [esi]
mov dword [ebp - 0x20], eax
mov eax, dword [esi + 4]
mov dword [ebp - 0x1c], eax
add esi, 8
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
lea eax, [ebp - 0x3c]
call fcn.00409e54
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.00406cf4
mov eax, dword [ebp - 0x28]
mov dword [ebx + 0x58], eax
mov eax, dword [ebp - 0x24]
mov dword [ebx + 0x5c], eax
mov eax, dword [esi]
mov dword [ebp - 0x20], eax
mov eax, dword [esi + 4]
mov dword [ebp - 0x1c], eax
add esi, 8
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
lea eax, [ebp - 0x3c]
call fcn.00409e54
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.00406cf4
mov eax, dword [ebp - 0x28]
mov dword [ebx + 0x70], eax
mov eax, dword [ebp - 0x24]
mov dword [ebx + 0x74], eax
mov eax, dword [esi]
mov dword [ebp - 0x20], eax
mov eax, dword [esi + 4]
mov dword [ebp - 0x1c], eax
add esi, 8
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
lea eax, [ebp - 0x3c]
call fcn.00409e54
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.00406cf4
mov eax, dword [ebp - 0x28]
mov dword [ebx + 0x68], eax
mov eax, dword [ebp - 0x24]
mov dword [ebx + 0x6c], eax
mov eax, dword [ebx + 0x68]
mov dword [ebx + 0x60], eax
mov eax, dword [ebx + 0x6c]
mov dword [ebx + 0x64], eax
mov eax, dword [esi]
mov dword [ebx + 0x40], eax
add esi, 4
mov eax, dword [esi]
mov dword [ebx + 0x8c], eax
add esi, 4
xor eax, eax
mov dword [ebx + 0x84], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
sub eax, dword [ebp + 0xc]
mov edx, esi
sub edx, dword [ebp - 0x14]
add eax, edx
mov edx, dword [0x1049fe0]
mov edx, dword [edx]
add eax, dword [edx + 0x48]
mov dword [ebx + 0x88], eax
mov eax, dword [ebx + 0x8c]
add esi, eax
cmp byte [ebx + 0x3c], 3
jne 0x422bb8
call fcn.00409ebc
fstp qword [ebp - 0x20]
wait
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
lea eax, [ebp - 0x3c]
call fcn.00409e54
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.00406cf4
mov eax, dword [ebp - 0x28]
mov dword [ebx + 0x58], eax
mov eax, dword [ebp - 0x24]
mov dword [ebx + 0x5c], eax
mov eax, dword [ebx + 0x58]
mov dword [ebx + 0x70], eax
mov eax, dword [ebx + 0x5c]
mov dword [ebx + 0x74], eax
mov eax, dword [ebx + 0x58]
mov dword [ebx + 0x68], eax
mov eax, dword [ebx + 0x5c]
mov dword [ebx + 0x6c], eax
mov eax, dword [ebx + 0x58]
mov dword [ebx + 0x60], eax
mov eax, dword [ebx + 0x5c]
mov dword [ebx + 0x64], eax
mov dword [ebx + 0x40], 0x10
mov eax, 0x100000
call fcn.00403594
lea ecx, [ebp - 0xa0]
mov edx, 5
call fcn.0040828c
mov ecx, dword [ebp - 0xa0]
lea eax, [ebp - 0x9c]
mov edx, 0x1042274
call fcn.0040497c
mov edx, dword [ebp - 0x9c]
lea eax, [ebp - 0x98]
call fcn.00404e5c
mov eax, dword [ebp - 0x98]
lea edx, [ebp - 0x18]
call fcn.00407f64
lea edx, [ebp - 0xac]
mov eax, dword [ebx + 0xc]
call fcn.00419074
mov eax, dword [ebp - 0xac]
lea edx, [ebp - 0xa8]
call fcn.00419118
mov eax, dword [ebp - 0xa8]
lea edx, [ebp - 0xa4]
call fcn.00419024
lea eax, [ebp - 0xa4]
mov edx, dword [ebp - 0x18]
call fcn.00404ef4
mov eax, dword [ebp - 0xa4]
call fcn.00419250
test al, al
jne 0x422afa
mov eax, dword [ebp - 0x18]
call fcn.00404ee8
add eax, eax
push eax
mov eax, dword [ebp - 0x18]
call fcn.00404ed8
mov edx, eax
lea eax, [ebx + 0x10]
pop ecx
call fcn.00406d98
mov al, byte [ebx + 0x3c]
add al, 0xfe
sub al, 2
jae 0x422d5b
mov eax, dword [ebx + 0x34]
mov eax, dword [eax + 8]
xor edx, edx
call fcn.00405000
je 0x422d5b
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x100]
call fcn.004059a0
mov edi, eax
dec edi
test edi, edi
jl 0x422d5b
inc edi
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x100]
mov edx, dword [ebp - 0xc]
mov eax, dword [eax + edx*8]
lea edx, [ebp - 0xb0]
call fcn.00407f64
mov edx, dword [ebp - 0xb0]
mov eax, dword [ebx + 0x34]
mov eax, dword [eax + 8]
call fcn.00405000
jne 0x422d51
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x100]
mov edx, dword [ebp - 0xc]
mov eax, dword [eax + edx*8 + 4]
lea edx, [ebp - 0x18]
call fcn.00419024
mov eax, dword [ebx + 0x34]
call fcn.0042803c
dec eax
test eax, eax
jl 0x422ca6
inc eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x10], 0
lea ecx, [ebp - 0xbc]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebx + 0x34]
call fcn.00428020
mov ecx, dword [ebp - 0xbc]
lea eax, [ebp - 0xb8]
mov edx, dword [ebp - 0x18]
call fcn.00404f54
mov eax, dword [ebp - 0xb8]
lea edx, [ebp - 0xb4]
call fcn.00419024
mov edx, dword [ebp - 0xb4]
lea eax, [ebp - 0x18]
call fcn.00404d04
inc dword [ebp - 0x10]
dec dword [ebp - 0x2c]
jne 0x422c5a
lea eax, [ebx + 0x28]
mov edx, dword [ebp - 0x18]
call fcn.00404ce0
mov ecx, dword [ebp - 0x18]
mov dl, 1
mov eax, dword [0x1046f28]
call fcn.004280d4
mov dword [ebx + 0x2c], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x100]
mov edx, dword [ebp - 0xc]
mov eax, dword [eax + edx*8 + 4]
lea edx, [ebp - 0x18]
call fcn.00419024
mov eax, dword [ebx + 0x38]
call fcn.0042803c
dec eax
test eax, eax
jl 0x422d3f
inc eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x10], 0
lea ecx, [ebp - 0xc8]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebx + 0x38]
call fcn.00428020
mov ecx, dword [ebp - 0xc8]
lea eax, [ebp - 0xc4]
mov edx, dword [ebp - 0x18]
call fcn.00404f54
mov eax, dword [ebp - 0xc4]
lea edx, [ebp - 0xc0]
call fcn.00419024
mov edx, dword [ebp - 0xc0]
lea eax, [ebp - 0x18]
call fcn.00404d04
inc dword [ebp - 0x10]
dec dword [ebp - 0x2c]
jne 0x422cf3
mov ecx, dword [ebp - 0x18]
mov dl, 1
mov eax, dword [0x1046f28]
call fcn.004280d4
mov dword [ebx + 0x30], eax
inc dword [ebp - 0xc]
dec edi
jne 0x422bf9
mov dl, 1
mov eax, dword [0x1034dc4]
call fcn.00403af4
mov dword [ebx + 0x78], eax
mov dl, 1
mov eax, dword [0x1034dc4]
call fcn.00403af4
mov dword [ebx + 0x7c], eax
mov dl, 1
mov eax, dword [0x1034dc4]
call fcn.00403af4
mov dword [ebx + 0x80], eax
sub esi, dword [ebp - 0x14]
mov eax, dword [ebp + 8]
add dword [eax], esi
mov eax, dword [ebp - 0x14]
call fcn.00403270
mov eax, dword [ebx + 0x90]
call fcn.004059a0
mov edi, eax
dec edi
test edi, edi
jl 0x422de9
inc edi
xor esi, esi
mov edx, dword [0x103b458]
mov eax, 0x98
call fcn.00405650
mov edx, dword [ebx + 0x90]
mov dword [edx + esi*4], eax
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebx + 0x90]
mov edx, dword [eax + esi*4]
mov ecx, dword [ebx + 0xc]
mov eax, dword [ebp - 4]
call fcn.00422524
inc esi
dec edi
jne 0x422db0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x104225e
lea eax, [ebp - 0xc8]
mov edx, 0xa
call fcn.00404cbc
lea eax, [ebp - 0xa0]
mov edx, 2
call fcn.004046a8
lea eax, [ebp - 0x98]
mov edx, 3
call fcn.00404cbc
lea eax, [ebp - 0x8c]
mov edx, 2
call fcn.004046a8
lea eax, [ebp - 0x84]
mov edx, 0x12
call fcn.00404cbc
lea eax, [ebp - 0x18]
call fcn.00404ca4
lea eax, [ebp - 8]
call fcn.00404ca4
ret