Function at 0x508270
Capabilities:
Accept command line arguments
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x78
push ebx
push esi
push edi
jmp 0x508942
mov dword [ebp - 0x1c], 0
lea eax, [ebp - 0x48]
push eax
call dword [0x513130]
mov ecx, dword [ebp - 0x1c]
and ecx, 1
test ecx, ecx
je 0x508397
mov edx, dword [ebp - 0x18]
and edx, 0xffff
mov dword [ebp - 0x78], edx
jmp 0x50839e
mov dword [ebp - 0x78], 0xa
mov eax, dword [ebp - 0x78]
mov dword [ebp + 0x14], eax
push 0
call dword [0x513140]
mov dword [ebp + 8], eax
mov dword [ebp + 0xc], 0
call dword [0x51311c]
mov dword [ebp + 0x10], eax
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x54], ecx
mov word [0x512f00], 0
mov word [0x512bf8], 0
cmp dword [ebp + 0xc], 0
jne 0x5083f0
mov ecx, dword [ebp + 8]
call 0x5094e0
test eax, eax
jne 0x5083f0
xor eax, eax
jmp 0x508947
push 0x104
push 0x512d6c
mov edx, dword [ebp + 8]
push edx
call dword [0x513120]
test eax, eax
jne 0x50840f
xor eax, eax
jmp 0x508947
mov edx, dword [ebp + 0x14]
mov ecx, dword [ebp + 8]
call 0x509540
test eax, eax
jne 0x508439
push 0
push 0x512c6c
push 0x50f3c8
push 0
call dword [0x513200]
xor eax, eax
jmp 0x508947
mov dword [ebp - 0x4c], 1
mov eax, dword [ebp + 0x10]
mov dword [0x512d0c], eax
call 0x50b320
test eax, eax
nop
nop
nop
nop
nop
nop
mov word [0x512f00], 1
mov dword [0x512ee8], 1
mov ecx, dword [0x512f04]
and ecx, 3
test ecx, ecx
jne 0x508491
mov edx, dword [0x512f04]
or edx, 3
mov dword [0x512f04], edx
mov eax, dword [0x512e70]
xor eax, 3
mov dword [0x512e70], eax
mov ecx, dword [0x512f04]
and ecx, 0x70
test ecx, ecx
jne 0x5084ba
mov edx, dword [0x512f04]
or edx, 0x70
mov dword [0x512f04], edx
mov eax, dword [0x512e70]
xor eax, 0x70
mov dword [0x512e70], eax
mov ecx, dword [0x512f04]
and ecx, 0xa00
test ecx, ecx
jne 0x5084e8
mov edx, dword [0x512f04]
or dh, 0xa
mov dword [0x512f04], edx
mov eax, dword [0x512e70]
xor eax, 0xa00
mov dword [0x512e70], eax
mov ecx, dword [0x512f04]
and ecx, 0xe000
test ecx, ecx
jne 0x508516
mov edx, dword [0x512f04]
or dh, 0xe0
mov dword [0x512f04], edx
mov eax, dword [0x512e70]
xor eax, 0xe000
mov dword [0x512e70], eax
mov ecx, dword [0x512f04]
and ecx, 0x60000
test ecx, ecx
jne 0x508547
mov edx, dword [0x512f04]
or edx, 0x60000
mov dword [0x512f04], edx
mov eax, dword [0x512e70]
xor eax, 0x60000
mov dword [0x512e70], eax
mov ecx, dword [0x512f04]
and ecx, 0x200000
test ecx, ecx
jne 0x508578
mov edx, dword [0x512f04]
or edx, 0x200000
mov dword [0x512f04], edx
mov eax, dword [0x512e70]
xor eax, 0x200000
mov dword [0x512e70], eax
jmp 0x5088ad
lea edx, [ebp - 0x54]
lea ecx, [ebp - 0x50]
call 0x5089d0
mov dword [ebp - 4], eax
push 0
push 0
push 0x10
mov eax, dword [0x512d28]
push eax
call dword [0x513208]
cmp dword [0x512efc], 2
je 0x508925
cmp dword [ebp - 0x4c], 1
jne 0x508925
xor ecx, ecx
mov cx, word [0x512f00]
test ecx, ecx
je 0x508925
xor edx, edx
mov dx, word [0x512d64]
cmp edx, 0x8005
je 0x508925
mov eax, dword [ebp + 8]
push eax
push 0x50f288
call dword [0x513198]
xor ecx, ecx
mov cx, word [0x50f298]
test ecx, ecx
je 0x508925
mov edx, dword [ebp - 0x54]
push edx
lea edx, [ebp - 0x50]
mov ecx, dword [ebp - 4]
call 0x508950
cmp dword [ebp - 0x50], 0
je 0x508933
mov ecx, dword [ebp - 0x50]
call 0x50c450
mov eax, dword [ebp - 0x4c]
push eax
call dword [0x513124]
mov eax, dword [ebp - 0x4c]
jmp 0x508947
jmp 0x50836e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10