Function at 0x495187
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
and dword [esp + 0xc], 0
push ebx
mov ebx, edx
mov dword [esp + 0xc], ecx
push esi
push edi
test ebx, ebx
je 0x49572b
mov ecx, dword [ebx + 0x360]
test ecx, ecx
je 0x4951b8
add ecx, 0x44
call fcn.0044de31
mov ecx, dword [ebx + 0x3c4]
call fcn.0048b143
mov edi, eax
mov eax, dword [ebx + 0x360]
mov dword [esp + 0x10], edi
test eax, eax
je 0x4951da
mov dword [eax + 0x44], 0
cmp dword [ebx + 0x380], 0
mov edx, 0xffff
jne 0x49527f
push 0x393
push 0x75ce9c
push 1
push 0x20
call fcn.005f5c60
mov edi, eax
add esp, 0x10
mov dword [ebx + 0x380], edi
test edi, edi
je 0x495732
push 8
pop ecx
xor eax, eax
rep stosd dword es:[edi], eax
mov edi, 0x396
push edi
push 0x75cf20
push 1
push 0xffff
call fcn.005f5c60
mov ecx, dword [ebx + 0x380]
add esp, 0x10
mov dword [ecx + 4], eax
test eax, eax
jne 0x49526d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov esi, 0xfe
mov edx, 0x75cf40
push esi
push edi
xor ecx, ecx
call fcn.0048f95e
add esp, 0xc
push edi
push 0x75cf60
push 0x75cf80
jmp 0x49575f
mov eax, dword [ebx + 0x380]
mov edx, 0xffff
mov edi, dword [esp + 0x10]
mov dword [eax + 0xc], edx
mov ecx, dword [ebx + 0x380]
mov eax, dword [ecx]
sub eax, 0
je 0x4956a8
sub eax, 1
je 0x495689
sub eax, 1
je 0x49539a
sub eax, 1
jne 0x49572b
push 2
pop edi
cmp dword [ebp + 0x10], edi
jl 0x49572b
mov eax, dword [ebp + 8]
mov esi, edi
cmp byte [eax + esi - 2], 0xd
jne 0x4952ca
cmp byte [esi + eax - 1], 0xa
je 0x4952d5
inc esi
cmp esi, dword [ebp + 0x10]
jle 0x4952bc
jmp 0x49572b
cmp esi, edi
jne 0x495390
mov edx, dword [esp + 0x10]
xor edi, edi
inc edi
mov dword [ecx + 0x1c], edi
test edx, edx
je 0x49532f
cmp dword [edx + 0x54], 0
je 0x49532f
cmp dword [ebx + 0x378], 0
jne 0x495338
mov ecx, dword [ebx + 0x380]
mov eax, dword [ecx + 0x10]
mov dword [esp + 0xc], eax
lea eax, [ebx + 0x3e8]
push eax
push dword [edx + 0x38]
lea eax, [esp + 0x14]
push dword [edx + 0x34]
push edi
push dword [ecx + 0x14]
push eax
push dword [ecx + 4]
push dword [ebx + 0x3a0]
push 0
push ebx
call dword [edx + 0x54]
add esp, 0x28
cmp dword [ebx + 0x378], 0
je 0x495346
and dword [ebx + 0x378], 0
mov ecx, ebx
call fcn.00494f00
mov eax, dword [esp + 0x14]
test eax, eax
je 0x495359
mov ecx, eax
call fcn.00484fd7
test eax, eax
jne 0x495390
mov eax, dword [ebx + 0x380]
test eax, eax
je 0x495389
cmp dword [eax + 4], 0
je 0x495374
push edi
push dword [eax + 4]
call fcn.005f5b20
pop ecx
pop ecx
push edi
push dword [ebx + 0x380]
call fcn.005f5b20
and dword [ebx + 0x380], 0
pop ecx
pop ecx
mov edx, ebx
call fcn.00494f7f
mov eax, dword [ebp + 0xc]
mov dword [eax], esi
jmp 0x49572b
mov eax, dword [ebp + 0x10]
mov esi, eax
cmp eax, dword [ecx + 0x18]
mov eax, dword [ecx + 0x10]
cmovge esi, dword [ecx + 0x18]
cmp eax, dword [ecx + 0x14]
je 0x495485
mov eax, dword [ecx + 0xc]
mov edi, dword [esp + 0x10]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x10]
add eax, dword [ecx + 8]
cmp eax, dword [ecx + 0xc]
jle 0x495458
mov eax, dword [ecx + 8]
mov edi, edx
sub eax, dword [esp + 0x14]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x10]
add eax, dword [esp + 0x14]
cmp eax, edx
push 0x3de
cmovg edi, eax
mov eax, dword [ecx + 0xc]
push 0x75cfa8
push 1
add eax, edi
mov dword [esp + 0x20], edi
push eax
push dword [ecx + 4]
call fcn.005f5e10
mov edi, dword [esp + 0x24]
mov ecx, eax
add esp, 0x14
test ecx, ecx
jne 0x495442
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov esi, 0xfe
mov edi, 0x3df
push esi
push edi
mov edx, 0x75cfc8
xor ecx, ecx
call fcn.0048f95e
add esp, 0xc
push edi
push 0x75cfe8
push 0x75d008
jmp 0x49575f
mov eax, dword [ebx + 0x380]
mov dword [eax + 4], ecx
mov eax, dword [ebx + 0x380]
mov ecx, dword [esp + 0x14]
add dword [eax + 0xc], ecx
mov ecx, dword [ebx + 0x380]
push esi
push dword [ebp + 8]
mov eax, dword [ecx + 8]
mov edx, dword [ecx + 0xc]
mov ecx, dword [ecx + 4]
sub edx, eax
add ecx, eax
call section..text
mov eax, dword [ebx + 0x380]
pop ecx
pop ecx
add dword [eax + 8], esi
mov eax, dword [esp + 0x18]
jmp 0x495488
xor eax, eax
inc eax
xor edx, edx
mov dword [esp + 0xc], edx
test edi, edi
je 0x495659
cmp dword [edi + 0x54], edx
je 0x495659
cmp dword [ebx + 0x378], edx
jne 0x495659
test eax, eax
mov dword [esp + 0xc], edx
lea eax, [ebx + 0x3e8]
push eax
push dword [edi + 0x38]
push dword [edi + 0x34]
push edx
je 0x4955eb
push esi
lea eax, [esp + 0x20]
push eax
push dword [ebp + 8]
push dword [ebx + 0x3a0]
push edx
push ebx
call dword [edi + 0x54]
mov ecx, dword [esp + 0x34]
add esp, 0x28
mov eax, dword [ebx + 0x380]
test ecx, ecx
jne 0x4955bd
and dword [eax + 0x10], ecx
mov eax, dword [ebx + 0x380]
mov ecx, dword [ebp + 0x10]
mov dword [eax + 0x14], esi
mov eax, dword [ebx + 0x380]
mov edx, dword [eax + 8]
mov edi, dword [eax + 0xc]
mov dword [esp + 0x18], edi
lea eax, [edx + ecx]
cmp eax, edi
jle 0x495591
sub edx, edi
mov edi, 0xffff
push 0x420
push 0x75d02c
push 1
lea eax, [edx + ecx]
cmp eax, edi
cmovg edi, eax
mov eax, dword [esp + 0x24]
add eax, edi
push eax
mov eax, dword [ebx + 0x380]
push dword [eax + 4]
call fcn.005f5e10
mov ecx, eax
add esp, 0x14
test ecx, ecx
jne 0x49557f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov esi, 0xfe
mov edi, 0x421
push esi
push edi
mov edx, 0x75d04c
xor ecx, ecx
call fcn.0048f95e
add esp, 0xc
push edi
push 0x75d06c
push 0x75d08c
jmp 0x49575f
mov eax, dword [ebx + 0x380]
mov dword [eax + 4], ecx
mov eax, dword [ebx + 0x380]
add dword [eax + 0xc], edi
mov ecx, dword [ebx + 0x380]
push esi
push dword [ebp + 8]
mov eax, dword [ecx + 8]
mov edx, dword [ecx + 0xc]
mov ecx, dword [ecx + 4]
sub edx, eax
add ecx, eax
call section..text
mov eax, dword [ebx + 0x380]
pop ecx
pop ecx
add dword [eax + 8], esi
jmp 0x495653
xor edx, edx
cmp ecx, esi
je 0x4955d4
mov dword [eax + 0x10], ecx
mov eax, dword [ebx + 0x380]
mov dword [eax + 0x14], esi
jmp 0x495659
mov dword [eax + 0x10], edx
mov eax, dword [ebx + 0x380]
mov dword [eax + 0x14], edx
mov eax, dword [ebx + 0x380]
mov dword [eax + 8], edx
jmp 0x495659
mov ecx, dword [ebx + 0x380]
mov eax, dword [ecx + 8]
sub eax, dword [ecx + 0x10]
push eax
lea eax, [esp + 0x20]
push eax
mov eax, dword [ecx + 4]
add eax, dword [ecx + 0x10]
push eax
push dword [ebx + 0x3a0]
push edx
push ebx
call dword [edi + 0x54]
mov ecx, dword [ebx + 0x380]
add esp, 0x28
mov edi, dword [esp + 0xc]
mov eax, dword [ecx + 8]
mov edx, dword [ecx + 0x10]
sub eax, edx
cmp edi, eax
jne 0x495641
xor edx, edx
mov dword [ecx + 0x10], edx
mov eax, dword [ebx + 0x380]
mov dword [eax + 0x14], edx
mov eax, dword [ebx + 0x380]
mov dword [eax + 8], edx
jmp 0x495655
lea eax, [edx + edi]
mov dword [ecx + 0x10], eax
mov ecx, dword [ebx + 0x380]
mov eax, dword [ecx + 8]
mov dword [ecx + 0x14], eax
xor edx, edx
mov dword [esp + 0xc], esi
mov ecx, dword [ebx + 0x380]
mov eax, dword [esp + 0xc]
sub dword [ecx + 0x18], eax
mov ecx, dword [ebp + 0xc]
mov eax, dword [esp + 0xc]
mov dword [ecx], eax
mov eax, dword [ebx + 0x380]
cmp dword [eax + 0x18], edx
jne 0x49572b
mov dword [eax], 1
jmp 0x49572b
push 2
pop edi
cmp dword [ebp + 0x10], edi
jl 0x49572b
mov eax, dword [ebp + 0xc]
mov dword [eax], edi
mov eax, dword [ebx + 0x380]
and dword [eax], 0
jmp 0x49572b
cmp dword [ebp + 0x10], 3
jl 0x49572b
push 2
pop edi
cmp dword [ebp + 0x10], edi
jle 0x49572b
mov ecx, dword [ebp + 8]
cmp byte [ecx + edi - 2], 0xd
jne 0x4956c7
cmp byte [edi + ecx - 1], 0xa
je 0x4956cf
inc edi
cmp edi, dword [ebp + 0x10]
jl 0x4956b9
jmp 0x49572b
push 1
lea eax, [edi - 2]
xor edx, edx
push 0x75cfa4
push eax
call fcn.0048ba0a
mov esi, eax
add esp, 0xc
lea eax, [esp + 0x1c]
mov ecx, dword [esi]
push 0x10
push eax
mov edx, dword [ecx + 4]
mov ecx, dword [ecx]
mov byte [edx + ecx], 0
mov ecx, dword [esi]
push dword [ecx]
call fcn.0060e9c0
mov ecx, dword [ebx + 0x380]
add esp, 0xc
mov dword [ecx + 0x18], eax
mov eax, dword [ebp + 0xc]
mov dword [eax], edi
mov ecx, dword [ebx + 0x380]
mov eax, dword [ecx + 0x18]
neg eax
sbb eax, eax
add eax, 3
mov dword [ecx], eax
mov ecx, esi
call fcn.0048bbce
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov esi, 0xfe
mov edi, 0x393
push esi
push edi
mov edx, 0x75cebc
xor ecx, ecx
call fcn.0048f95e
add esp, 0xc
push edi
push 0x75cedc
push 0x75cefc
call fcn.00401109
add esp, 0xc
push esi
call fcn.005d08b0
int3