Function at 0x677fd0
Capabilities:
Hide graphical window

Disassembly:
sub esp, 0x248
push ebx
push ebp
push esi
push edi
mov ebp, ecx
mov ebx, edx
push 8
push ebp
mov dword [esp + 0x1c], ebx
call dword [sym.imp.USER32.dll_GetWindowLongA]
cmp ebx, 0x521
mov dword [esp + 0x24], eax
jg 0x6780ff
cmp ebx, 0x51e
jge case.0x67801e.1292
lea eax, [ebx - 0x50b]
cmp eax, 0x12
ja case.0x67812a.1317
xor ecx, ecx
mov cl, byte [eax + 0x678bc4]
jmp dword [ecx*4 + 0x678bb8]
cmp ebx, 0x50b
jne 0x678031
xor eax, eax
jmp 0x67808c
cmp ebx, 0x50e
jne 0x678040
mov eax, 1
jmp 0x67808c
cmp ebx, 0x516
jne 0x67804f
mov eax, 2
jmp 0x67808c
cmp ebx, 0x51a
jne 0x67805e
mov eax, 3
jmp 0x67808c
cmp ebx, 0x51b
jne 0x67806d
mov eax, 4
jmp 0x67808c
cmp ebx, 0x51c
jne 0x67807c
mov eax, 5
jmp 0x67808c
mov eax, ebx
sub eax, 0x51d
neg eax
sbb eax, eax
and al, 0xf9
add eax, 6
lea esi, [eax + 1]
mov ecx, esi
call fcn.004d13e0
mov ecx, esi
mov edi, eax
call fcn.004d0c20
mov edx, ebx
mov ecx, ebp
mov esi, eax
call fcn.00678c90
test al, al
mov byte [esp + 0x14], al
jne 0x6780c8
push 0xfffffffffffffffe
mov edx, edi
mov ecx, ebp
call fcn.004d1a60
mov edx, esi
mov ecx, ebp
push 0xfffffffffffffffe
call fcn.004d11c0
push edi
mov edi, dword [sym.imp.USER32.dll_GetDlgItem]
push ebp
call edi
mov ebx, eax
push esi
push ebp
call edi
mov edi, eax
mov esi, dword [esp + 0x14]
and esi, 0xff
push esi
push ebx
mov ebx, dword [sym.imp.USER32.dll_EnableWindow]
call ebx
push esi
push edi
call ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x248
ret 8
cmp ebx, 0x617
jg 0x678b6e
je case.0x67812a.1316
lea eax, [ebx - 0x522]
cmp eax, 0x9e
ja case.0x67812a.1317
xor edx, edx
mov dl, byte [eax + 0x678be8]
jmp dword [edx*4 + 0x678bd8]
mov eax, dword [0xa255c0]
mov edi, 0xa25c00
mov dword [esp + 0x10], eax
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x58]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov ebx, dword [0xa255c4]
mov eax, ecx
mov esi, edi
mov edi, edx
push 0xa25652
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x5c]
push ecx
call fcn.0076ec19
add esp, 8
mov ecx, ebp
call fcn.005de2e0
push 0
push ebp
call dword [sym.imp.USER32.dll_ShowWindow]
mov ecx, dword [0xb0de30]
call fcn.005c08a0
cmp eax, 2
jne 0x67826c
mov edx, dword [esp + 0x10]
mov ecx, ebx
mov dword [0xa255c0], edx
mov dword [0xa255c4], ebx
call fcn.005c1a80
mov ecx, ebp
call fcn.005c1480
push 5
push ebp
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [0xa25bec]
mov ecx, dword [0xa255c4]
mov ecx, dword [eax + ecx*4]
call fcn.00668220
mov edi, dword [sym.imp.USER32.dll_InvalidateRect]
test al, al
je 0x678251
mov esi, dword [0xa5a840]
test esi, esi
je 0x6781fa
mov ecx, esi
call fcn.00614ed0
push esi
call fcn.0076d2d5
add esp, 4
push 4
call fcn.0076d5a7
add esp, 4
test eax, eax
je 0x678211
mov ecx, eax
call fcn.00614ec0
jmp 0x678213
xor eax, eax
push str.RandMap.img
mov ecx, eax
mov dword [0xa5a840], eax
call fcn.00615c00
mov edx, dword [0xa5a840]
cmp dword [edx], 0
jne 0x678236
mov ecx, ebp
call fcn.005c1480
push 0
push 0
push ebp
call edi
push 0
push 0
push ebp
call edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x248
ret 8
mov ecx, ebp
call fcn.005c1480
push 0
push 0
push ebp
call edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x248
ret 8
mov eax, dword [0xa255c4]
cmp ebx, 0xffffffff
mov dword [esp + 0x14], eax
jne 0x678284
mov dword [esp + 0x18], 8
jmp 0x67828f
mov ecx, ebx
call fcn.005c0540
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x14]
call fcn.005c0540
mov ecx, dword [esp + 0x18]
mov edi, eax
mov eax, dword [esp + 0x14]
mov esi, edi
sub esi, ecx
cmp ebx, eax
jne 0x6782c6
mov edx, 1
mov ecx, ebp
call fcn.00678f00
lea ecx, [edi - 1]
mov edx, 1
push ecx
mov ecx, ebp
call fcn.00678cd0
test esi, esi
jle 0x6782d8
mov edx, dword [esp + 0x18]
push esi
mov ecx, ebp
call fcn.00678cd0
jmp 0x6782e3
jge 0x6782e3
mov edx, edi
mov ecx, ebp
call fcn.00678f00
push 5
push ebp
call dword [sym.imp.USER32.dll_ShowWindow]
mov ecx, dword [0xa255c4]
call fcn.005c1a80
test al, al
je 0x6783b3
mov ecx, dword [0xa255c0]
call fcn.005b39a0
mov edx, eax
mov ecx, ebp
call fcn.005bde40
mov ecx, ebp
call fcn.005bdea0
mov edx, dword [0xa25bec]
mov eax, dword [0xa255c4]
mov ecx, dword [edx + eax*4]
call fcn.00668220
test al, al
je 0x67839f
mov esi, dword [0xa5a840]
test esi, esi
je 0x67837b
mov ecx, esi
call fcn.00614ed0
push esi
call fcn.0076d2d5
add esp, 4
push 4
call fcn.0076d5a7
add esp, 4
test eax, eax
je 0x678362
mov ecx, eax
call fcn.00614ec0
jmp 0x678364
xor eax, eax
push str.RandMap.img
mov ecx, eax
mov dword [0xa5a840], eax
call fcn.00615c00
mov esi, dword [0xa5a840]
cmp dword [esi], 0
jne 0x678387
mov ecx, ebp
call fcn.005c1480
push 0
push 0
push ebp
call dword [sym.imp.USER32.dll_InvalidateRect]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x248
ret 8
mov ecx, ebp
call fcn.005c1480
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x248
ret 8
mov ecx, dword [esp + 0x10]
pop edi
pop esi
mov dword [0xa255c4], ebx
pop ebp
mov dword [0xa255c0], ecx
pop ebx
add esp, 0x248
ret 8
mov eax, dword [esp + 0x260]
xor edi, edi
cmp eax, edi
jne case.0x67812a.1317
cmp ebx, 0x617
jne 0x6783f9
push edi
push ebx
push ebp
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call dword [sym.imp.USER32.dll_EnableWindow]
mov ecx, dword [0xa255c4]
call fcn.005c0540
mov ebx, dword [sym.imp.USER32.dll_SendDlgItemMessageA]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x10], edi
test edi, edi
jne 0x67841d
mov esi, 0x50b
jmp 0x67846e
cmp edi, 1
jne 0x678429
mov esi, 0x50e
jmp 0x67846e
cmp edi, 2
jne 0x678435
mov esi, 0x516
jmp 0x67846e
cmp edi, 3
jne 0x678441
mov esi, 0x51a
jmp 0x67846e
cmp edi, 4
jne 0x67844d
mov esi, 0x51b
jmp 0x67846e
cmp edi, 5
jne 0x678459
mov esi, 0x51c
jmp 0x67846e
mov esi, edi
sub esi, 6
neg esi
sbb esi, esi
and esi, 0xfffffae2
add esi, 0x51d
push 0
push 0
push 0x147
push esi
push ebp
call ebx
push 0
push eax
push 0x150
push esi
push ebp
call ebx
test eax, eax
je 0x678495
cmp eax, 1
je 0x678495
cmp eax, 2
jne 0x678499
inc dword [esp + 0x10]
inc edi
cmp edi, 7
jl 0x678412
mov ecx, dword [esp + 0x10]
mov dword [0xa255e4], ecx
lea eax, [ecx + 1]
mov ecx, dword [esp + 0x14]
cmp ecx, 0x617
jne 0x6785c1
mov ecx, dword [esp + 0x1c]
cmp ecx, eax
jge 0x678542
push ecx
push 0x334
push str.C:RA2Skirmish.cpp
xor edx, edx
mov ecx, str.TXT_SCENARIO_TOO_SMALL
call fcn.006eea10
lea edx, [esp + 0x5c]
push eax
push edx
call fcn.0076ecf4
add esp, 0xc
xor edx, edx
mov ecx, str.TXT_OK
mov dword [esp + 0x20], 0x7c1614
push 0
push 0
push 0
push 0x335
push str.C:RA2Skirmish.cpp
call fcn.006eea10
lea ecx, [esp + 0x2c]
push eax
lea eax, [esp + 0x68]
push eax
call fcn.005b1140
push 1
push 0x617
push ebp
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call dword [sym.imp.USER32.dll_EnableWindow]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x248
ret 8
cmp eax, 1
jg 0x6785c1
push ecx
push 0x33c
push str.C:RA2Skirmish.cpp
xor edx, edx
mov ecx, str.TXT_NEED_AT_LEAST_TWO_PLAYERS
call fcn.006eea10
lea ecx, [esp + 0x5c]
push eax
push ecx
call fcn.0076ecf4
add esp, 0xc
xor edx, edx
mov ecx, str.TXT_OK
mov dword [esp + 0x28], 0x7c1614
push 0
push 0
push 0
push 0x33d
push str.C:RA2Skirmish.cpp
call fcn.006eea10
lea edx, [esp + 0x64]
lea ecx, [esp + 0x34]
push eax
push edx
call fcn.005b1140
push 1
push 0x617
push ebp
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call dword [sym.imp.USER32.dll_EnableWindow]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x248
ret 8
mov esi, dword [0xa255ac]
lea ecx, [esp + 0x18]
call fcn.0075af50
mov eax, dword [esi]
lea ecx, [esp + 0x18]
push ecx
mov ecx, esi
call dword [eax + 0x14]
test al, al
jne 0x678652
cmp dword [esp + 0x14], 0x617
jne 0x67864d
push 0
push 0
push 0
push 0x34b
push str.C:RA2Skirmish.cpp
xor edx, edx
mov ecx, str.TXT_OK
mov dword [esp + 0x40], 0x7c1614
call fcn.006eea10
lea ecx, [esp + 0x24]
push eax
call fcn.0075b990
lea ecx, [esp + 0x3c]
push eax
call fcn.005b1140
push 1
push 0x617
push ebp
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call dword [sym.imp.USER32.dll_EnableWindow]
lea ecx, [esp + 0x18]
call fcn.0075aff0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x248
ret 8
call fcn.005b3880
mov eax, dword [0xa255c4]
mov ecx, dword [0xa25bf8]
mov edx, dword [0xa255c0]
cmp eax, ecx
mov dword [0xa256e4], edx
mov dword [0xa256e8], eax
jl 0x67867c
mov dword [0xa256e8], 0
push 0x6a0
push ebp
call dword [sym.imp.USER32.dll_GetDlgItem]
lea ecx, [esp + 0x30]
push ecx
push 0x14
push 0x4b3
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
lea edx, [esp + 0x30]
mov ecx, 0xa256b0
push 0xffffffffffffffff
call fcn.006eec40
mov edx, 0x6a1
mov ecx, ebp
push 0xffffffffffffffff
call fcn.004d13a0
mov ecx, 0xa255a8
push 1
push eax
call fcn.00668b50
xor eax, eax
test eax, eax
lea edi, [eax + 1]
jne 0x6786d6
mov esi, 0x50b
jmp 0x678725
cmp eax, 1
jne 0x6786e2
mov esi, 0x50e
jmp 0x678725
cmp eax, 2
jne 0x6786ee
mov esi, 0x516
jmp 0x678725
cmp eax, 3
jne 0x6786fa
mov esi, 0x51a
jmp 0x678725
cmp eax, 4
jne 0x678706
mov esi, 0x51b
jmp 0x678725
cmp eax, 5
jne 0x678712
mov esi, 0x51c
jmp 0x678725
sub eax, 6
neg eax
sbb eax, eax
and eax, 0xfffffae2
add eax, 0x51d
mov esi, eax
mov ecx, edi
call fcn.004d0c20
mov ecx, edi
mov ebx, eax
call fcn.004d13e0
mov dword [esp + 0x1c], eax
push 0
push 0
push 0x147
push esi
push ebp
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
push 0
push eax
push 0x150
push esi
push ebp
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
test eax, eax
je 0x678768
cmp eax, 1
je 0x678768
cmp eax, 2
jne 0x6787b6
push 0
push 0
push 0x147
push esi
push ebp
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
push 0
push eax
push 0x150
push esi
push ebp
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
mov edx, ebx
mov ecx, ebp
push 0xffffffffffffffff
mov dword [edi*4 + 0xa255ec], eax
call fcn.004d13a0
mov ecx, ebp
mov dword [edi*4 + 0xa2560c], eax
mov edx, dword [esp + 0x1c]
push 0xffffffffffffffff
call fcn.004d1e80
mov dword [edi*4 + 0xa2562c], eax
mov eax, edi
cmp eax, 7
jl 0x6786c8
xor edi, edi
mov dword [esp + 0x10], 0xa25710
test edi, edi
jne 0x6787d6
mov esi, 0x50b
jmp 0x678827
cmp edi, 1
jne 0x6787e2
mov esi, 0x50e
jmp 0x678827
cmp edi, 2
jne 0x6787ee
mov esi, 0x516
jmp 0x678827
cmp edi, 3
jne 0x6787fa
mov esi, 0x51a
jmp 0x678827
cmp edi, 4
jne 0x678806
mov esi, 0x51b
jmp 0x678827
cmp edi, 5
jne 0x678812
mov esi, 0x51c
jmp 0x678827
mov esi, edi
sub esi, 6
neg esi
sbb esi, esi
and esi, 0xfffffae2
add esi, 0x51d
inc edi
mov ecx, edi
call fcn.004d0c20
mov ecx, edi
mov ebx, eax
call fcn.004d13e0
mov dword [esp + 0x1c], eax
push 0
push 0
push 0x147
push esi
push ebp
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
push 0
push eax
push 0x150
push esi
push ebp
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
mov edx, ebx
mov ecx, ebp
push 0xffffffffffffffff
mov esi, eax
call fcn.004d13a0
mov ecx, ebp
mov ebx, eax
mov edx, dword [esp + 0x1c]
push 0xffffffffffffffff
call fcn.004d1e80
cmp esi, 0xffffffff
jne 0x678885
mov edx, 1
jmp 0x6788a8
test esi, esi
jne 0x678890
mov edx, 4
jmp 0x6788a8
cmp esi, 1
jne 0x67889c
mov edx, 5
jmp 0x6788a8
xor edx, edx
cmp esi, 2
setne dl
dec edx
and edx, 6
mov ecx, dword [esp + 0x10]
mov dword [ecx - 4], edx
mov dword [ecx], ebx
mov dword [ecx + 4], eax
lea edx, [edi + 1]
add ecx, 0xc
cmp edx, 8
mov dword [esp + 0x10], ecx
jl 0x6787cb
push 0xffffffffffffffff
mov edx, 0x6a2
mov ecx, ebp
call fcn.004d1e80
mov ecx, 0xa255a8
push 1
push eax
call fcn.00668c00
push 0x71
call fcn.0076d5a7
mov esi, eax
add esp, 4
test esi, esi
je 0x678980
lea ecx, [esi + 0x28]
call fcn.00522800
mov ecx, 0xa256b0
call fcn.006eecd0
push eax
push esi
call fcn.0076ec19
mov eax, dword [0xa256cc]
add esp, 8
mov dword [esi + 0x49], eax
mov ecx, dword [0xa256c4]
mov dword [esi + 0x51], ecx
mov dword [esi + 0x61], 0xffffffff
mov eax, dword [0xa27d90]
mov ecx, dword [0xa27d98]
cmp ecx, eax
jl 0x678968
mov cl, byte [0xa27d95]
test cl, cl
jne 0x678947
test eax, eax
jne 0x678980
mov ecx, dword [0xa27d9c]
test ecx, ecx
jle 0x678980
mov edx, dword [0xa27d88]
add eax, ecx
push 0
push eax
mov ecx, 0xa27d88
call dword [edx + 8]
test al, al
je 0x678980
mov ecx, dword [0xa27d98]
mov eax, ecx
inc ecx
mov dword [0xa27d98], ecx
mov ecx, dword [0xa27d8c]
mov dword [ecx + eax*4], esi
mov ecx, 0xa255a8
call fcn.00668cd0
mov edi, dword [sym.imp.USER32.dll_GetDlgItem]
push 0x529
push ebp
call edi
test eax, eax
je 0x6789c3
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push 0
push 0x400
push eax
call esi
mov ecx, 6
sub ecx, eax
mov dword [0xa255d8], ecx
mov dword [0xa28738], ecx
jmp 0x6789c9
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
push 0x511
push ebp
call edi
test eax, eax
je 0x6789e6
push 0
push 0
push 0x400
push eax
call esi
mov dword [0xa255cc], eax
push 0x50c
push ebp
call edi
test eax, eax
je 0x678a03
push 0
push 0
push 0x400
push eax
call esi
mov dword [0xa255e0], eax
mov edx, dword [0xa255d8]
mov eax, dword [0xa255cc]
mov ecx, dword [0xa255e0]
push 0x54e
push ebp
mov dword [0xa256ec], edx
mov dword [0xa256f0], eax
mov dword [0xa256f4], ecx
call edi
test eax, eax
je 0x678a49
push 0
push 0
push 0xf0
push eax
call esi
cmp eax, 1
sete dl
mov byte [0xa255d2], dl
push 0x69a
push ebp
call edi
test eax, eax
je 0x678a6c
push 0
push 0
push 0xf0
push eax
call esi
cmp eax, 1
sete al
mov byte [0xa255d3], al
push 0x69d
push ebp
call edi
test eax, eax
je 0x678a90
push 0
push 0
push 0xf0
push eax
call esi
cmp eax, 1
sete cl
mov byte [0xa255d4], cl
push 0x693
push ebp
call edi
test eax, eax
je 0x678ab4
push 0
push 0
push 0xf0
push eax
call esi
cmp eax, 1
sete dl
mov byte [0xa25650], dl
push 0x696
push ebp
call edi
test eax, eax
je 0x678ad6
push 0
push 0
push 0xf0
push eax
call esi
cmp eax, 1
sete byte [0xa255d1]
mov al, byte [0xa255d2]
mov cl, byte [0xa255d3]
mov esi, dword [0xa5a840]
mov dl, byte [0xa255d4]
mov byte [0xa256f8], al
mov al, byte [0xa25650]
mov byte [0xa256f9], cl
mov cl, byte [0xa255d1]
test esi, esi
mov byte [0xa256fa], dl
mov byte [0xa256fb], al
mov byte [0xa256fc], cl
mov byte [0xa2564f], 0
mov byte [0xa255d0], 1
mov byte [0xa2564d], 0
mov byte [0xa255dc], 0
je 0x678b4e
mov ecx, esi
call fcn.00614ed0
push esi
call fcn.0076d2d5
add esp, 4
mov dword [0xa5a840], 0
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x18]
mov dword [eax], edx
call fcn.0075aff0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x248
ret 8
mov eax, ebx
sub eax, 0x6a1
je case.0x67801e.1292
dec eax
jne case.0x67812a.1317
cmp dword [esp + 0x260], 1
jne case.0x67812a.1317
mov edx, ebx
mov ecx, ebp
call fcn.004d1cb0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x248
ret 8
mov ecx, ebx
call fcn.004d0c80
mov edx, eax
mov ecx, ebp
call fcn.004d0b00
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x248
ret 8
les ebx, [eax - 0x3e]
or al, 0
nop
nop
nop