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

Disassembly:
push 0xffffffffffffffff
push 0x41e6c0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x340
mov al, byte [esp + 3]
push ebx
push ebp
push esi
xor esi, esi
push edi
push esi
lea ecx, [esp + 0x18]
mov byte [esp + 0x18], al
call fcn.0040f880
lea ecx, [esp + 0x13c]
mov dword [esp + 0x358], esi
call fcn.00412050
mov ecx, 0xa
xor eax, eax
lea edi, [esp + 0x4c]
mov dword [esp + 0x4c], 0x41f158
mov ebp, 0x88
rep stosd dword es:[edi], eax
mov dword [esp + 0x68], ebp
mov edx, dword [0x426448]
mov ecx, 0x426448
mov byte [esp + 0x358], 2
call dword [edx + 0xc]
mov edx, 0x42665c
mov ebx, 0x400
mov ecx, 0xa
xor eax, eax
mov edi, edx
add edx, 0x28
rep stosd dword es:[edi], eax
mov dword [edx - 0xc], ebp
dec ebx
jne 0x4075f4
mov ebx, dword [esp + 0x360]
push esi
push 2
lea eax, [esp + 0x30]
push ebx
push eax
mov ebp, 3
call fcn.00410c00
add esp, 0x10
mov ecx, dword [0x41f17c]
mov byte [esp + 0x358], 3
push ecx
push esi
push eax
lea ecx, [esp + 0x20]
call fcn.0040f570
push 1
lea ecx, [esp + 0x2c]
mov byte [esp + 0x35c], 2
call fcn.0040f880
mov edx, dword [esp + 0x1c]
cmp edx, esi
jbe 0x407c5b
mov edi, 0x422520
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x422520
push edx
push esi
lea ecx, [esp + 0x24]
call fcn.00410310
cmp eax, esi
jne 0x4079d1
mov eax, ebp
push esi
push eax
lea edx, [esp + 0x10c]
push ebx
push edx
inc ebp
call fcn.00410c00
add esp, 0x10
mov ecx, dword [0x41f17c]
mov byte [esp + 0x358], 4
push ecx
push esi
push eax
lea ecx, [esp + 0x20]
call fcn.0040f570
push 1
lea ecx, [esp + 0x108]
mov byte [esp + 0x35c], 2
call fcn.0040f880
push esi
push ebp
lea edx, [esp + 0x9c]
push ebx
push edx
call fcn.00410c00
add esp, 0x10
mov edx, eax
mov edi, 0x42251c
or ecx, 0xffffffff
xor eax, eax
mov byte [esp + 0x358], 5
repne scasb al, byte es:[edi]
mov eax, dword [edx + 8]
not ecx
dec ecx
push ecx
push 0x42251c
push eax
push esi
mov ecx, edx
call fcn.00410310
cmp eax, esi
je 0x407776
push esi
push ebp
lea ecx, [esp + 0xec]
push ebx
push ecx
call fcn.00410c00
add esp, 0x10
mov edx, eax
mov edi, 0x422518
or ecx, 0xffffffff
xor eax, eax
mov byte [esp + 0x358], 6
repne scasb al, byte es:[edi]
mov eax, dword [edx + 8]
not ecx
dec ecx
push ecx
push 0x422518
push eax
push esi
mov ecx, edx
call fcn.00410310
cmp eax, esi
push 1
lea ecx, [esp + 0xe8]
mov byte [esp + 0x35c], 5
sete byte [esp + 0x17]
call fcn.0040f880
mov al, byte [esp + 0x13]
mov byte [esp + 0x13], 0
test al, al
je 0x40777b
mov byte [esp + 0x13], 1
push 1
lea ecx, [esp + 0x98]
mov byte [esp + 0x35c], 2
call fcn.0040f880
mov al, byte [esp + 0x13]
test al, al
je 0x4079b4
push 0x20
push 1
lea ecx, [esp + 0x1c]
call fcn.0040f4a0
mov eax, ebp
push esi
push eax
lea ecx, [esp + 0x7c]
push ebx
push ecx
inc ebp
call fcn.00410c00
add esp, 0x10
mov edx, dword [0x41f17c]
lea ecx, [esp + 0x14]
push edx
push esi
push eax
mov byte [esp + 0x364], 7
call fcn.0040f9f0
push 1
lea ecx, [esp + 0x78]
mov byte [esp + 0x35c], 2
call fcn.0040f880
push esi
push ebp
lea eax, [esp + 0xbc]
push ebx
push eax
call fcn.00410c00
add esp, 0x10
mov edi, eax
mov eax, dword [edi + 8]
mov byte [esp + 0x358], 8
cmp eax, esi
ja 0x407813
call fcn.00415317
mov ecx, dword [edi + 4]
push str.KQkq_
mov dl, byte [ecx]
push edx
call fcn.00410f20
add esp, 8
lea ecx, [esp + 0xb4]
mov byte [esp + 0x13], al
mov byte [esp + 0x358], 2
push 1
call fcn.0040f880
mov al, byte [esp + 0x13]
test al, al
je 0x4079b4
push 0x20
push 1
lea ecx, [esp + 0x1c]
call fcn.0040f4a0
mov eax, ebp
push esi
push eax
lea eax, [esp + 0xfc]
push ebx
push eax
inc ebp
call fcn.00410c00
add esp, 0x10
mov ecx, dword [0x41f17c]
mov byte [esp + 0x358], 9
push ecx
push esi
push eax
lea ecx, [esp + 0x20]
call fcn.0040f9f0
push 1
lea ecx, [esp + 0xf8]
mov byte [esp + 0x35c], 2
call fcn.0040f880
push esi
push ebp
lea edx, [esp + 0xdc]
push ebx
push edx
call fcn.00410c00
add esp, 0x10
mov edi, eax
mov eax, dword [edi + 8]
mov byte [esp + 0x358], 0xa
cmp eax, esi
ja 0x4078c8
call fcn.00415317
mov eax, dword [edi + 4]
push str.abcdefgh
mov cl, byte [eax]
push ecx
call fcn.00410f20
add esp, 8
lea ecx, [esp + 0xd4]
mov byte [esp + 0x13], al
mov byte [esp + 0x358], 2
push 1
call fcn.0040f880
mov al, byte [esp + 0x13]
test al, al
je 0x4079b4
push esi
push ebp
lea edx, [esp + 0x8c]
push ebx
push edx
call fcn.00410c00
add esp, 0x10
mov edi, eax
mov eax, dword [edi + 8]
mov byte [esp + 0x358], 0xb
cmp eax, 1
ja 0x40792b
call fcn.00415317
mov eax, dword [edi + 4]
push 0x422500
mov cl, byte [eax + 1]
push ecx
call fcn.00410f20
add esp, 8
lea ecx, [esp + 0x84]
mov byte [esp + 0x13], al
mov byte [esp + 0x358], 2
push 1
call fcn.0040f880
mov al, byte [esp + 0x13]
test al, al
je 0x4079b4
push 0x20
push 1
lea ecx, [esp + 0x1c]
call fcn.0040f4a0
mov eax, ebp
push esi
push eax
lea edx, [esp + 0xac]
push ebx
push edx
inc ebp
call fcn.00410c00
add esp, 0x10
mov ecx, dword [0x41f17c]
mov byte [esp + 0x358], 0xc
push ecx
push esi
push eax
lea ecx, [esp + 0x20]
call fcn.0040f9f0
push 1
lea ecx, [esp + 0xa8]
mov byte [esp + 0x35c], 2
call fcn.0040f880
mov eax, dword [esp + 0x18]
cmp eax, esi
jne 0x4079c1
mov eax, 0x41f178
push eax
mov ecx, 0x426448
call fcn.00412310
jmp 0x407be9
mov edi, str.startpos
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x1c]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.startpos
push edx
push esi
lea ecx, [esp + 0x24]
call fcn.00410310
cmp eax, esi
jne 0x407a0d
push str.rnbqkbnr_pppppppp_8_8_8_8_PPPPPPPP_RNBQKBNR_w_KQkq__
mov ecx, 0x426448
call fcn.00412310
jmp 0x407be9
mov edi, str.moves
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x1c]
not ecx
dec ecx
push ecx
push str.moves
push eax
push esi
lea ecx, [esp + 0x24]
call fcn.00410310
cmp eax, esi
jne 0x407be9
mov eax, dword [0x426654]
mov edx, dword [0x426650]
mov ecx, 0x80
mov esi, 0x42644c
lea edi, [esp + 0x140]
push 0
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [0x42664c]
mov dword [esp + 0x34c], eax
mov eax, ebp
mov dword [esp + 0x348], edx
mov dword [esp + 0x344], ecx
mov ecx, dword [0x426658]
push eax
lea edx, [esp + 0xcc]
push ebx
push edx
mov dword [esp + 0x35c], ecx
inc ebp
call fcn.00410c00
add esp, 0x10
mov ecx, dword [0x41f17c]
mov byte [esp + 0x358], 0xd
push ecx
push 0
push eax
lea ecx, [esp + 0x20]
call fcn.0040f570
push 1
lea ecx, [esp + 0xc8]
mov byte [esp + 0x35c], 2
call fcn.0040f880
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x407be7
mov dword [esp + 0x24], 0x42665c
mov dl, byte [esp + 0x14]
sub esp, 0x10
mov esi, esp
mov dword [esp + 0x58], esp
push 0
mov ecx, esi
mov byte [esi], dl
call fcn.0040f880
mov eax, dword [0x41f17c]
lea ecx, [esp + 0x24]
push eax
push 0
push ecx
mov ecx, esi
call fcn.0040f570
lea edx, [esp + 0x124]
lea ecx, [esp + 0x14c]
push edx
call fcn.004126e0
mov ecx, 0xa
mov esi, eax
lea edi, [esp + 0x4c]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x54]
cmp eax, ecx
mov dword [esp + 0x114], 0x41f158
je 0x407b73
lea ecx, [esp + 0x4c]
push ecx
lea ecx, [esp + 0x140]
call fcn.004120c0
test al, al
je 0x407b73
mov eax, dword [esp + 0x24]
cmp eax, 0x43065c
jge 0x407b73
mov edi, eax
add eax, 0x28
mov ecx, 0xa
lea esi, [esp + 0x4c]
mov dword [esp + 0x24], eax
rep movsd dword es:[edi], dword [esi]
xor esi, esi
mov eax, ebp
push esi
push eax
lea edx, [esp + 0x40]
push ebx
push edx
inc ebp
call fcn.00410c00
add esp, 0x10
mov ecx, dword [0x41f17c]
mov byte [esp + 0x358], 0xe
push ecx
push esi
push eax
lea ecx, [esp + 0x20]
call fcn.0040f570
mov eax, dword [esp + 0x3c]
mov byte [esp + 0x358], 2
cmp eax, esi
je 0x407bcf
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x407bc6
cmp al, 0xff
je 0x407bc6
dec al
mov byte [ecx], al
jmp 0x407bcf
push ecx
call fcn.004150e0
add esp, 4
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x3c], esi
cmp eax, esi
mov dword [esp + 0x40], esi
mov dword [esp + 0x44], esi
jne 0x407adb
xor esi, esi
mov eax, ebp
push esi
push eax
lea edx, [esp + 0x30]
push ebx
push edx
inc ebp
call fcn.00410c00
add esp, 0x10
mov ecx, dword [0x41f17c]
mov byte [esp + 0x358], 0xf
push ecx
push esi
push eax
lea ecx, [esp + 0x20]
call fcn.0040f570
mov eax, dword [esp + 0x2c]
mov byte [esp + 0x358], 2
cmp eax, esi
je 0x407c43
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x407c3a
cmp al, 0xff
je 0x407c3a
dec al
mov byte [ecx], al
jmp 0x407c43
push ecx
call fcn.004150e0
add esp, 4
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x2c], esi
cmp edx, esi
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], esi
ja 0x40765e
lea ecx, [esp + 0x13c]
mov dword [esp + 0x4c], 0x41f158
mov byte [esp + 0x358], 0
call fcn.004120b0
mov ecx, dword [esp + 0x18]
cmp ecx, esi
je 0x407c9b
mov al, byte [ecx - 1]
test al, al
je 0x407c91
cmp al, 0xff
je 0x407c91
dec al
mov byte [ecx - 1], al
jmp 0x407c9b
dec ecx
push ecx
call fcn.004150e0
add esp, 4
mov ecx, dword [esp + 0x350]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x34c
ret