Function at 0x412590
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [ebp + 0x14]
movzx edx, byte [ebp + 0x13]
test edx, 0x80
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x10], esi
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x14], eax
je 0x4125c4
lea eax, [ebp + 0x1f]
and eax, 0xfffffffc
mov edx, dword [eax]
mov dword [ebp - 0x48], edx
jmp 0x4125cb
mov dword [ebp - 0x48], 0
push 0x6d95c0
call fcn.00409240
add esp, 4
mov eax, dword [0x6d95c4]
test eax, eax
jne 0x412fec
mov dword [0x6d95c4], 1
test byte [ebp - 0x48], 0x40
je 0x412669
push 4
call fcn.0045cb30
add esp, 4
test eax, eax
je 0x412612
push 0
push 0x20d
call fcn.0041b620
add esp, 8
push 1
call fcn.0045cb30
add esp, 4
test eax, eax
je 0x41262f
push 0
push 0x20e
call fcn.0041b620
add esp, 8
push 8
call fcn.0045cb30
add esp, 4
test eax, eax
je 0x41264c
push 0
push 0x20f
call fcn.0041b620
add esp, 8
push 0x10
call fcn.0045cb30
add esp, 4
test eax, eax
je 0x412669
push 0
push 0x210
call fcn.0041b620
add esp, 8
movzx ecx, byte [ebp + 0x13]
mov eax, ecx
and eax, 8
shr eax, 3
test ebx, ebx
jne 0x412683
test eax, eax
je 0x412c5e
jmp 0x412685
test eax, eax
mov dword [ebp - 0x18], edi
mov esi, ebx
je 0x41272c
test ebx, ebx
jne 0x4126d5
push 0
push 0x209
call fcn.0041c7b0
push 0x40
push eax
push str.Stop___Program_terminated.
call fcn.00468700
add esp, 0x14
mov ecx, str.Stop___Program_terminated.
mov dword [ebp - 0x18], str.Stop___Program_terminated.
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x4126d3
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x4126be
dec eax
mov esi, eax
cmp dword [ebp + 0x18], 0
jne 0x4126e5
xor edi, edi
movzx ecx, byte [ebp + 0x13]
xor ebx, ebx
jmp 0x412730
push 0
push 0x20a
call fcn.0041c7b0
push 0x40
push eax
push str.Return_code
call fcn.00468700
add esp, 0x14
mov ecx, str.Return_code
mov dword [ebp - 0x18], str.Return_code
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x412724
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x41270f
dec eax
movzx ecx, byte [ebp + 0x13]
mov esi, eax
jmp 0x412730
xor edi, edi
xor ebx, ebx
and ecx, 8
mov edx, 2
shr ecx, 2
lea eax, [ebp - 0x44]
push 0x2a
shl edx, cl
lea ecx, [ebp - 4]
push eax
push ecx
add edx, 0xfffffffe
push edx
mov dword [ebp - 0x4c], edx
call fcn.00421ea0
mov edx, dword [ebp - 0x4c]
add esp, 0x10
test eax, eax
je 0x412789
mov ecx, dword [ebp + 0x10]
movzx ecx, cl
test cl, 1
je 0x412778
movzx eax, ax
mov ebx, dword [ebp - 8]
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
push str.unknown
push edx
push 2
push eax
call fcn.0041b620
add esp, 0x10
mov edx, dword [ebp - 4]
test byte [edx + 0x169], 0x20
je 0x412dbe
test byte [edx + 0x16a], 0x40
je 0x412a21
push 0
push edx
mov dword [ebp - 0x4c], edx
call fcn.0042fd40
mov edx, dword [ebp - 0x4c]
add esp, 8
test eax, eax
je 0x412825
mov eax, dword [edx + 0x18]
test eax, eax
je 0x412c96
test byte [eax + 0x44], 2
je 0x4127fb
mov ecx, 0x26
mov dword [eax + 0x38], ecx
mov eax, dword [edx + 0x18]
mov dword [eax + 0x3c], ecx
mov eax, dword [edx + 0x64]
test eax, eax
je 0x4127e9
xor ecx, ecx
mov dword [eax + 4], ecx
mov dword [edx + 0x64], ecx
mov eax, 0x26
mov ebx, dword [ebp - 8]
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
mov eax, 0x26
push eax
movzx ecx, byte [edx + 0x16c]
push eax
and ecx, 7
push ecx
push 0xffffffffffffffff
push edx
call fcn.00428620
add esp, 0x14
mov ebx, dword [ebp - 8]
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
movsx eax, byte [edx + 0x154]
mov dword [ebp - 0x20], eax
lea eax, [eax - 1]
cmp eax, 7
ja case.default.0x412842
mov eax, dword [eax*4 + 0x4cf4d0]
jmp eax
mov eax, dword [edx + 0x40]
test eax, eax
jne 0x41284e
mov eax, dword [edx + 0x38]
mov ecx, dword [edx + 0xf8]
mov dword [edx + 0x3c], eax
lea ecx, [eax + ecx - 1]
mov dword [edx + 0x44], ecx
movzx ecx, byte [edx + 0x168]
mov dword [ebp - 0x24], ecx
jmp 0x412987
mov eax, dword [edx + 0x18]
test eax, eax
je 0x412cb5
test byte [eax + 0x44], 2
je 0x4128ad
mov ecx, 0x2c
mov dword [eax + 0x38], ecx
mov eax, dword [edx + 0x18]
mov dword [eax + 0x3c], ecx
mov eax, dword [edx + 0x64]
test eax, eax
je 0x41289b
xor ecx, ecx
mov dword [eax + 4], ecx
mov dword [edx + 0x64], ecx
mov eax, 0x2c
mov ebx, dword [ebp - 8]
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
mov eax, 0x2c
push eax
movzx ecx, byte [edx + 0x16c]
push eax
and ecx, 7
push ecx
push 0xffffffffffffffff
push edx
call fcn.00428620
add esp, 0x14
mov ebx, dword [ebp - 8]
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
mov eax, dword [edx + 0x40]
test eax, eax
je 0x4128e3
add eax, 4
jmp 0x4128e9
mov eax, dword [edx + 0x38]
add eax, 4
mov ecx, dword [edx + 0xf8]
mov dword [edx + 0x3c], eax
lea ecx, [eax + ecx - 8]
mov dword [edx + 0x44], ecx
movzx ecx, byte [edx + 0x168]
mov dword [ebp - 0x24], ecx
jmp 0x412987
mov eax, dword [edx + 0x40]
test eax, eax
jne 0x412912
mov eax, dword [edx + 0x38]
mov ecx, dword [edx + 0xf8]
mov dword [ebp - 0x4c], ecx
mov dword [edx + 0x3c], eax
add ecx, eax
mov dword [ebp - 0x48], ecx
movzx ecx, byte [edx + 0x168]
test cl, 4
mov dword [ebp - 0x24], ecx
je 0x41294a
test byte [edx + 0x16a], 0x40
je 0x41294a
test byte [edx + 0x16b], 8
je 0x41294a
cmp dword [ebp - 0x20], 1
je 0x412952
mov ecx, dword [ebp - 0x48]
mov dword [edx + 0x44], ecx
jmp 0x412987
mov ecx, dword [ebp - 0x4c]
lea ecx, [eax + ecx - 2]
mov dword [edx + 0x44], ecx
jmp 0x412987
push 0x203
push str.for_stop.c
push 2
push 8
mov dword [ebp - 0x4c], edx
call fcn.0041b620
mov edx, dword [ebp - 0x4c]
add esp, 0x10
movzx eax, byte [edx + 0x168]
mov dword [ebp - 0x24], eax
mov eax, dword [edx + 0x3c]
test byte [ebp - 0x24], 4
je 0x4129a8
test byte [edx + 0x16a], 0x40
je 0x4129a8
test byte [edx + 0x16b], 8
je 0x4129a8
cmp byte [edx + 0x154], 1
je 0x4129f3
movsx ecx, byte [edx + 0x156]
cmp ecx, 2
jne 0x4129cf
movsx ecx, byte [edx + 0x154]
cmp ecx, 7
je 0x4129f3
cmp ecx, 6
je 0x4129f3
cmp ecx, 8
je 0x4129f3
dec dword [edx + 0x44]
jmp 0x4129f3
cmp ecx, 1
jne 0x4129f3
movsx ecx, byte [edx + 0x154]
cmp ecx, 7
je 0x4129ed
cmp ecx, 6
je 0x4129ed
cmp ecx, 8
je 0x4129ed
dec dword [edx + 0x44]
add eax, 5
mov dword [edx + 0x3c], eax
mov dword [edx + 0x48], eax
mov dword [edx + 0x4c], 0
mov eax, dword [ebp - 4]
cmp byte [eax + 0x156], 1
jne 0x412b71
mov eax, dword [eax + 0x3c]
mov byte [eax], 0x20
mov edx, dword [ebp - 4]
inc dword [edx + 0x3c]
mov eax, dword [ebp - 4]
jmp 0x412b71
push 0
push edx
mov dword [ebp - 0x4c], edx
call fcn.0042fd40
mov edx, dword [ebp - 0x4c]
add esp, 8
test eax, eax
je 0x412aa0
mov eax, dword [edx + 0x18]
test eax, eax
je 0x412cd4
test byte [eax + 0x44], 2
je 0x412a76
mov ecx, 0x26
mov dword [eax + 0x38], ecx
mov eax, dword [edx + 0x18]
mov dword [eax + 0x3c], ecx
mov eax, dword [edx + 0x64]
test eax, eax
je 0x412a64
xor ecx, ecx
mov dword [eax + 4], ecx
mov dword [edx + 0x64], ecx
mov eax, 0x26
mov ebx, dword [ebp - 8]
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
mov eax, 0x26
push eax
movzx ecx, byte [edx + 0x16c]
push eax
and ecx, 7
push ecx
push 0xffffffffffffffff
push edx
call fcn.00428620
add esp, 0x14
mov ebx, dword [ebp - 8]
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
movsx eax, byte [edx + 0x154]
dec eax
cmp eax, 7
ja case.default.0x412ab8
mov eax, dword [eax*4 + 0x4cf4b0]
jmp eax
mov eax, dword [edx + 0x40]
test eax, eax
jne 0x412ac4
mov eax, dword [edx + 0x38]
mov ecx, dword [edx + 0xf8]
mov dword [edx + 0x3c], eax
lea eax, [eax + ecx - 1]
mov dword [edx + 0x44], eax
mov eax, dword [ebp - 4]
jmp 0x412b71
mov eax, 1
mov word [ebp - 0x4c], ax
mov eax, dword [edx + 0x40]
test eax, eax
je 0x412cf3
mov byte [eax + 2], 1
mov eax, dword [edx + 0x40]
mov byte [eax + 3], 0
mov ecx, dword [edx + 0x40]
add ecx, 4
mov eax, dword [edx + 0xf8]
mov dword [edx + 0x3c], ecx
add ecx, eax
mov dword [edx + 0x44], ecx
mov eax, dword [ebp - 4]
jmp 0x412b71
mov eax, dword [edx + 0x40]
test eax, eax
je 0x412b20
add eax, 4
jmp 0x412b26
mov eax, dword [edx + 0x38]
add eax, 4
mov ecx, dword [edx + 0xf8]
mov dword [edx + 0x3c], eax
lea eax, [eax + ecx - 8]
mov dword [edx + 0x44], eax
mov eax, dword [ebp - 4]
jmp 0x412b71
mov ecx, dword [edx + 0x40]
test ecx, ecx
jne 0x412b45
mov ecx, dword [edx + 0x38]
mov eax, dword [edx + 0xf8]
mov dword [edx + 0x3c], ecx
add ecx, eax
mov dword [edx + 0x44], ecx
mov eax, dword [ebp - 4]
jmp 0x412b71
push 0x209
push str.for_stop.c
push 2
push 8
call fcn.0041b620
add esp, 0x10
mov eax, dword [ebp - 4]
test esi, esi
jle 0x412b97
mov dword [ebp - 0x1c], edi
xor edx, edx
mov ecx, dword [ebp - 0x18]
mov edi, dword [eax + 0x3c]
movzx eax, byte [edx + ecx]
mov byte [edi + edx], al
inc edx
cmp edx, esi
jge 0x412b91
mov eax, dword [ebp - 4]
jmp 0x412b7d
mov edi, dword [ebp - 0x1c]
mov eax, dword [ebp - 4]
test ebx, ebx
jle 0x412bb6
xor ecx, ecx
mov edx, esi
add edx, dword [eax + 0x3c]
movzx eax, byte [ecx + edi]
mov byte [edx + ecx], al
inc ecx
cmp ecx, ebx
jge 0x412bb3
mov eax, dword [ebp - 4]
jmp 0x412b9d
mov eax, dword [ebp - 4]
lea edx, [esi + ebx]
add dword [eax + 0x3c], edx
mov eax, dword [ebp - 4]
test byte [eax + 0x16a], 0x40
je 0x412bd0
push eax
call fcn.0042e850
jmp 0x412bd6
push eax
call fcn.0042ddd0
add esp, 4
test eax, eax
je 0x412d3c
mov ecx, dword [ebp - 4]
cmp dword [0x6e39a0], 0
jne 0x412bfa
cmp dword [ecx + 0xe4], 0
je 0x412d0f
mov edx, dword [ecx + 0x18]
test edx, edx
je 0x412da4
test byte [edx + 0x44], 2
je 0x412c39
mov dword [edx + 0x38], eax
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 0x18]
mov dword [ecx + 0x3c], eax
mov ebx, dword [ebp - 4]
mov edx, dword [ebx + 0x64]
test edx, edx
je 0x412c2c
xor ecx, ecx
mov dword [edx + 4], ecx
mov edx, dword [ebp - 4]
mov dword [edx + 0x64], ecx
mov ebx, dword [ebp - 8]
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
push eax
movzx edx, byte [ecx + 0x16c]
push eax
and edx, 7
push edx
push 0xffffffffffffffff
push ecx
call fcn.00428620
add esp, 0x14
mov ebx, dword [ebp - 8]
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
call fcn.00431e50
cmp dword [0x6e39a0], 0
je 0x412d5b
cmp dword [ebp + 0x18], 1
mov eax, dword [ebp - 0x14]
je 0x412c7e
mov eax, 0
push eax
mov dword [0x6d95c0], 0
call fcn.004bdc50
add esp, 4
jmp 0x412d5b
push edx
mov eax, 0x26
push eax
push eax
push 1
call fcn.00419550
add esp, 0x10
mov ebx, dword [ebp - 8]
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
push edx
mov eax, 0x2c
push eax
push eax
push 1
call fcn.00419550
add esp, 0x10
mov ebx, dword [ebp - 8]
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
push edx
mov eax, 0x26
push eax
push eax
push 1
call fcn.00419550
add esp, 0x10
mov ebx, dword [ebp - 8]
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
mov eax, dword [edx + 0x38]
mov byte [eax + 2], 1
mov ecx, dword [edx + 0x38]
movzx eax, byte [ebp - 0x4b]
mov byte [ecx + 3], al
mov ecx, dword [edx + 0x38]
add ecx, 4
jmp 0x412b01
add esi, ebx
test esi, esi
jle 0x412bfa
mov eax, dword [ecx + 0x3c]
cmp dword [ebp - 0x14], 0x86
mov byte [eax], 0
je 0x412d97
mov edx, str.STOP_message
mov eax, dword [ebp - 4]
push dword [eax + 0x38]
push edx
call fcn.0041c9d0
add esp, 8
mov eax, dword [ebp - 4]
push dword [eax + 0x100]
call fcn.00422a80
add esp, 4
call fcn.00431e50
cmp dword [0x6e39a0], 0
jne 0x412d74
cmp dword [ebp + 0x18], 1
mov eax, dword [ebp - 0x14]
je 0x412d69
mov eax, 0
push eax
call fcn.00468c10
jmp 0x412ff9
cmp dword [ebp + 0x18], 1
mov eax, dword [ebp - 0x14]
je 0x412d82
mov eax, 0
push eax
mov dword [0x6d95c0], 0
call fcn.004bdc50
add esp, 4
jmp 0x412d5b
cmp dword [ebp + 0x18], 1
jne 0x412d28
mov edx, str.ABORT
jmp 0x412d2d
push ecx
push eax
push eax
push 1
call fcn.00419550
add esp, 0x10
mov ebx, dword [ebp - 8]
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x1c], edi
movzx edi, byte [ebp + 0x12]
shr edi, 2
and edi, 1
mov dword [ebp - 0x4c], ebx
add edi, edi
movzx ebx, byte [edx + 0x168]
and ebx, 0xfffffffd
or ebx, edi
mov byte [edx + 0x168], bl
mov edi, dword [ebp - 4]
movzx edx, byte [ebp + 0x10]
shr edx, 7
movzx ecx, byte [edi + 0x168]
and ecx, 0xfffffffe
or ecx, edx
movzx edx, byte [ebp + 0x13]
mov byte [edi + 0x168], cl
mov edi, edx
shr edi, 3
and edi, 1
mov ebx, dword [ebp - 4]
movzx ecx, byte [ebx + 0x168]
lea eax, [edi*4]
and ecx, 0xfffffffb
or ecx, eax
mov byte [ebx + 0x168], cl
mov ecx, edx
mov ebx, dword [ebp - 4]
shr ecx, 2
and ecx, 1
movzx eax, byte [ebx + 0x168]
shl ecx, 3
and eax, 0xfffffff7
or eax, ecx
mov byte [ebx + 0x168], al
mov eax, edx
mov ebx, dword [ebp - 4]
shr eax, 6
and eax, 1
movzx ecx, byte [ebx + 0x168]
shl eax, 4
and ecx, 0xffffffef
or ecx, eax
mov byte [ebx + 0x168], cl
mov ecx, edi
mov eax, dword [ebp - 4]
shl ecx, 5
shl edi, 3
movzx ebx, byte [eax + 0x168]
and ebx, 0xffffffdf
or ebx, ecx
mov byte [eax + 0x168], bl
mov ebx, edx
mov eax, dword [ebp - 4]
shr ebx, 4
and ebx, 1
movzx ecx, byte [eax + 0x171]
shl ebx, 2
and ecx, 0xfffffffb
or ecx, ebx
mov byte [eax + 0x171], cl
mov ecx, dword [ebp - 4]
shr edx, 5
and edx, 1
movzx eax, byte [ecx + 0x171]
and eax, 0xfffffff7
or eax, edi
mov edi, edx
mov byte [ecx + 0x171], al
mov eax, dword [ebp - 4]
shl edi, 6
shl edx, 7
movzx ecx, byte [eax + 0x168]
and ecx, 0xffffffbf
or ecx, edi
mov byte [eax + 0x168], cl
mov ecx, dword [ebp - 4]
movzx ebx, byte [ecx + 0x168]
and ebx, 0x7f
or ebx, edx
mov byte [ecx + 0x168], bl
mov edi, dword [ebp - 4]
mov ecx, dword [ebp - 0x48]
mov edx, ecx
and edx, 1
movzx ebx, byte [edi + 0x169]
and ebx, 0xfffffffe
or ebx, edx
mov byte [edi + 0x169], bl
mov ebx, ecx
mov edx, dword [ebp - 4]
shr ebx, 1
and ebx, 1
movzx eax, byte [edx + 0x171]
shl ebx, 5
and eax, 0xffffffdf
or eax, ebx
mov byte [edx + 0x171], al
mov edx, dword [ebp - 4]
shr ecx, 2
and ecx, 3
movzx eax, byte [edx + 0x169]
add ecx, ecx
and eax, 0xfffffff9
or eax, ecx
mov ecx, 1
push ecx
push 4
mov byte [edx + 0x169], al
push ecx
push dword [ebp - 4]
mov ebx, dword [ebp - 0x4c]
mov edi, dword [ebp - 0x1c]
call fcn.0040cf90
add esp, 0x10
test eax, eax
je 0x412fca
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x18]
test edx, edx
je 0x412fd2
test byte [edx + 0x44], 2
je 0x412fa5
mov dword [edx + 0x38], eax
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 0x18]
mov dword [ecx + 0x3c], eax
mov ebx, dword [ebp - 4]
mov edx, dword [ebx + 0x64]
test edx, edx
je 0x412f98
xor ecx, ecx
mov dword [edx + 4], ecx
mov edx, dword [ebp - 4]
mov dword [edx + 0x64], ecx
mov ebx, dword [ebp - 8]
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
push eax
movzx edx, byte [ecx + 0x16c]
push eax
and edx, 7
push edx
push 0xffffffffffffffff
push ecx
call fcn.00428620
add esp, 0x14
mov ebx, dword [ebp - 8]
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 4]
jmp 0x412799
push ecx
push eax
push eax
push 2
call fcn.00419550
add esp, 0x10
mov ebx, dword [ebp - 8]
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
xor eax, eax
push eax
mov dword [0x6d95c0], eax
call fcn.00468c10
add esp, 4
lea esi, [esi]
push ebp
mov ebp, esp
sub esp, 8
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0
push dword [ebp - 4]
xor eax, eax
push eax
push eax
push dword [ebp - 8]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00412590
add esp, 0x18
mov esp, ebp
pop ebp
ret