Function at 0x4a903a
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4d152c
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x31ac
call fcn.00401910
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x31a8], eax
push ebx
push esi
push edi
mov eax, dword [section..data]
xor eax, esp
push eax
lea eax, [esp + 0x31c0]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0x30], esi
cmp dword [ebp + 0xc], 0
mov eax, dword [esi + 8]
mov ebx, dword [ebp + 8]
movzx eax, word [eax + 0x82c2]
mov dword [esp + 0x28], eax
jne 0x4a90ca
cmp byte [esi + 0x21d7], 0
je 0x4a90c3
push ecx
push ecx
lea edx, [esi + 0x10]
mov ecx, ebx
call fcn.004b5c4f
pop ecx
pop ecx
test al, al
jne 0x4a90ca
push 1
mov ecx, 0x511830
call fcn.004a8593
xor al, al
jmp 0x4a9b6a
mov edi, dword [ebx + 0x654c]
cmp edi, 2
je 0x4a9137
cmp edi, 3
jne 0x4a90f9
cmp byte [esi + 0x546d], 0
je 0x4a9b57
mov ecx, dword [esi + 8]
lea eax, [esi + 0x546e]
push eax
mov edx, ebx
call fcn.004a8e63
pop ecx
cmp edi, 5
jne 0x4a9b57
cmp byte [ebx + 0x890c], 0
je 0x4a90c3
push ecx
push ecx
lea edx, [esi + 0x10]
mov ecx, ebx
call fcn.004b5c4f
pop ecx
pop ecx
test al, al
je 0x4a90b7
mov eax, dword [ebx]
mov ecx, ebx
push 0
push dword [ebx + 0xb04c]
push dword [ebx + 0xb048]
call dword [eax + 0xc]
jmp 0x4a9b68
mov ecx, dword [esi + 8]
xor edx, edx
mov byte [esi + 0x546d], dl
cmp dword [ecx + 0x5158], edx
jne 0x4a9164
mov eax, dword [ecx + 0xa2f8]
cmp dword [esi + 0x4464], eax
jb 0x4a9164
cmp byte [esi + 0x4469], dl
jne 0x4a90c3
mov byte [esp + 0x18], dl
lea eax, [ebx + 0x65f0]
push ecx
lea edx, [esp + 0x1c]
push edx
push eax
call fcn.004a6df7
test eax, eax
setne al
mov dword [esp + 0x24], eax
test al, al
je 0x4a9196
cmp byte [esp + 0x18], 0
jne 0x4a9196
xor eax, eax
mov byte [esi + 0x4469], al
mov ecx, ebx
call fcn.004a4b92
lea ecx, [ebx + 0x6610]
lea edx, [esp + 0x21b4]
call fcn.004abb8a
cmp byte [ebx + 0x76d3], 0
je 0x4a9231
mov eax, dword [esi + 8]
mov eax, dword [eax + 0x6284]
cmp eax, 1
je 0x4a9255
cmp byte [esp + 0x18], 0
jne 0x4a9255
mov ecx, dword [esp + 0x24]
xor edx, edx
test eax, eax
movzx ecx, cl
push 0x3b
cmove ecx, edx
xor eax, eax
mov edi, eax
mov dword [esp + 0x28], ecx
lea eax, [esp + 0x21b8]
push eax
call dword [sym.imp.msvcrt.dll_wcsrchr]
pop ecx
pop ecx
test eax, eax
je 0x4a920b
lea ecx, [eax + 2]
call fcn.004aedb0
mov edi, eax
mov ecx, dword [esi + 8]
mov ecx, dword [ecx + 0x6284]
dec ecx
cmp ecx, edi
jne 0x4a9229
mov dl, 1
lea ecx, [esp + 0x21b4]
call fcn.004ac08a
jmp 0x4a9255
xor eax, eax
mov byte [esp + 0x24], al
jmp 0x4a9255
mov al, byte [ebx + 0x76d1]
test al, al
jne 0x4a9255
mov eax, dword [esi + 8]
xor edx, edx
mov ecx, dword [esp + 0x24]
movzx ecx, cl
cmp dword [eax + 0x6284], 1
cmova ecx, edx
mov byte [esp + 0x24], cl
mov al, byte [ebx + 0x7679]
mov byte [esi + 0x21d7], al
xor eax, eax
mov byte [esi + 0x21d8], al
mov ecx, dword [ebx + 0xb050]
sub ecx, dword [ebx + 0x7638]
mov edx, dword [ebx]
push eax
mov eax, dword [ebx + 0xb054]
sbb eax, dword [ebx + 0x763c]
push eax
push ecx
mov ecx, ebx
call dword [edx + 0xc]
xor ecx, ecx
mov al, cl
mov byte [esp + 0x16], cl
mov ecx, dword [esp + 0x24]
test cl, cl
jne 0x4a92ad
mov cl, byte [ebx + 0xb05c]
mov byte [esp + 0x16], cl
test cl, cl
je 0x4a9b3e
push ecx
lea edi, [esi + 0x546e]
push edi
lea eax, [esp + 0x21bc]
push eax
push ecx
mov ecx, esi
call fcn.004a9d49
xor eax, eax
cmp byte [esp + 0x16], al
jne 0x4a92df
cmp word [edi], ax
je 0x4a92df
mov byte [esp + 0x1c], 1
cmp byte [ebx + 0x7678], al
je 0x4a92e3
mov byte [esp + 0x1c], al
mov eax, dword [esi + 8]
push 0x45
pop ecx
push 0x58
cmp byte [eax + 0x514f], 0
pop edx
jne 0x4a92fe
cmp byte [eax + 0x5150], 0
je 0x4a937d
mov eax, dword [esp + 0x28]
cmp ax, cx
je 0x4a930c
cmp ax, dx
jne 0x4a937d
lea ecx, [esp + 0x1164]
call fcn.004a8812
push ecx
lea edx, [esp + 0x1168]
mov ecx, edi
call fcn.004ab1b6
pop ecx
test al, al
je 0x4a94b3
mov edi, dword [ebx + 0x7624]
mov ecx, dword [esp + 0x2178]
mov edx, dword [ebx + 0x7620]
mov eax, dword [esp + 0x2174]
cmp ecx, edi
ja 0x4a935c
jb 0x4a9354
cmp eax, edx
ja 0x4a935c
cmp eax, edx
jne 0x4a9377
cmp ecx, edi
jne 0x4a9377
cmp byte [esp + 0x2170], 0
je 0x4a9371
cmp ecx, dword [esi + 4]
ja 0x4a9377
jb 0x4a9371
cmp eax, dword [esi]
jae 0x4a9377
xor eax, eax
mov byte [esp + 0x1c], al
lea edi, [esi + 0x546e]
cmp byte [ebx + 0x767b], 0
je 0x4a93c1
mov ecx, esi
call fcn.004a9e37
test al, al
je 0x4a90c3
mov eax, dword [esi + 8]
mov al, byte [eax + 0x4120]
test al, al
jne 0x4a93c1
push 1
mov ecx, 0x511830
call fcn.004a8593
mov eax, dword [esi + 8]
mov dword [eax + 0x82a0], 0x16
xor eax, eax
mov byte [esp + 0x1c], al
mov edx, dword [esi + 8]
xor eax, eax
add edx, 0x729c
cmp word [edx], ax
je 0x4a93de
push 0x800
mov ecx, edi
call fcn.004ae191
pop ecx
push ecx
push ebx
call fcn.004aa221
test al, al
jne 0x4a9408
xor eax, eax
mov ecx, 0x511830
push 2
mov byte [esp + 0x20], al
call fcn.004a8593
mov eax, dword [esi + 8]
mov dword [eax + 0x82a0], 0xe
lea ecx, [esp + 0x13c]
call fcn.004aa53e
xor edx, edx
mov dword [esp + 0x2c], 0x50
mov dword [esp + 0x31c8], edx
mov eax, dword [ebx + 0x76e0]
test eax, eax
setne cl
mov byte [esp + 0x23], cl
test cl, cl
je 0x4a94d1
cmp eax, 5
je 0x4a94d1
mov ecx, dword [esp + 0x1c]
test cl, cl
je 0x4a955f
mov eax, dword [esp + 0x2c]
cmp word [esp + 0x28], ax
je 0x4a955b
mov eax, dword [esi + 8]
cmp byte [eax + 0x51c1], dl
jne 0x4a955b
mov ecx, edi
mov byte [esp + 0x18], dl
call fcn.004ab079
xor edx, edx
test al, al
je 0x4a9557
xor eax, eax
push eax
sub esp, 0xc
lea eax, [esp + 0x28]
push eax
push ecx
mov ecx, dword [esi + 8]
push edi
call fcn.004aa271
xor edx, edx
add esp, 0x1c
cmp byte [esp + 0x18], dl
je 0x4a9557
mov cl, dl
mov dword [esp + 0x1c], ecx
jmp 0x4a955b
mov eax, dword [esi + 8]
xor edx, edx
mov ecx, dword [esp + 0x1c]
movzx ecx, cl
cmp byte [eax + 0x514f], dl
cmovne ecx, edx
mov dword [esp + 0x1c], ecx
jmp 0x4a937d
mov al, byte [ebx + 0x76d1]
test al, al
je 0x4a9535
cmp byte [esp + 0x1c], dl
je 0x4a951c
mov eax, dword [esp + 0x28]
cmp ax, 0x50
je 0x4a951c
cmp ax, 0x49
je 0x4a951c
push 0x45
pop edx
cmp ax, dx
je 0x4a951c
mov eax, dword [esi + 8]
cmp dword [eax + 0x5154], 1
je 0x4a951c
inc dword [esi + 0x445c]
cmp byte [eax + 0x51c1], 0
jne 0x4a951c
push ebx
mov ecx, esi
call fcn.004a9f55
or dword [esp + 0x31c8], 0xffffffff
lea ecx, [esp + 0x13c]
call fcn.004aa594
jmp 0x4a9b68
mov ecx, dword [esp + 0x1c]
test cl, cl
je 0x4a955f
lea eax, [esp + 0x13c]
push eax
push ecx
mov ecx, esi
call fcn.004aa10e
mov cl, al
xor edx, edx
mov dword [esp + 0x1c], ecx
jmp 0x4a955b
mov ecx, dword [esp + 0x1c]
test cl, cl
jne 0x4a957c
cmp byte [ebx + 0xb05c], 0
je 0x4a9574
mov cl, 1
mov byte [esp + 0x16], cl
mov byte [esp + 0x1c], cl
jmp 0x4a9580
test cl, cl
je 0x4a9b15
mov cl, byte [esp + 0x16]
mov eax, dword [esi + 8]
cmp byte [eax + 0x51c1], 0
jne 0x4a95bd
test cl, cl
jne 0x4a95bd
mov eax, dword [esp + 0x2c]
mov byte [esp + 0x18], dl
cmp word [esp + 0x28], ax
je 0x4a95c6
lea ecx, [esp + 0x13c]
call fcn.004aad29
test al, al
je 0x4a95c6
push 5
mov ecx, 0x511830
call fcn.004a8561
jmp 0x4a95c6
mov byte [esp + 0x18], 1
test cl, cl
jne 0x4a95cc
inc dword [esi + 0x445c]
inc dword [esi + 0x4460]
lea edi, [esp + 0x34]
mov esi, dword [esi + 8]
push 0x40
add esi, 0x4020
pop ecx
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov esi, dword [esp + 0x30]
lea eax, [ebx + 0x7681]
xor ecx, ecx
mov byte [esp + 0x31c8], 1
cmp byte [ebx + 0x7680], cl
lea edx, [ebx + 0x7691]
cmovne ecx, eax
lea edi, [esi + 0x10]
lea eax, [esp + 0x21ac]
push eax
lea eax, [ebx + 0x76ab]
push eax
push dword [ebx + 0x76cc]
lea eax, [esp + 0x40]
push edx
push ecx
push eax
push dword [ebx + 0x767c]
xor eax, eax
lea ecx, [edi + 0x1100]
push eax
call fcn.004a7881
mov byte [edi + 0x4441], al
xor eax, eax
mov byte [esp + 0x17], al
cmp byte [ebx + 0x767b], al
je 0x4a9696
cmp byte [ebx + 0x76a1], al
je 0x4a9696
push 8
lea eax, [esp + 0x21b0]
push eax
lea eax, [ebx + 0x76a2]
push eax
call dword [sym.imp.msvcrt.dll_memcmp]
add esp, 0xc
test eax, eax
je 0x4a9694
cmp byte [ebx + 0xb06c], 0
jne 0x4a9694
inc dword [0x511834]
mov dword [0x511830], 0xb
mov byte [esp + 0x17], 1
xor eax, eax
lea ecx, [esi + 0x38e8]
mov dword [esi + 0x21f8], eax
push ecx
mov dword [esi + 0x21fc], eax
mov dword [esi + 0x2200], eax
mov dword [esi + 0x2204], eax
push dword [ebx + 0x7650]
call fcn.004ab4cb
push ecx
push dword [ebx + 0x7650]
lea ecx, [esi + 0x2218]
call fcn.004ab4cb
mov eax, dword [ebx + 0x7638]
mov ecx, dword [ebx + 0x763c]
mov dl, byte [esp + 0x17]
mov dword [esi + 0x30], eax
lea eax, [esp + 0x13c]
mov dword [esi + 0x34], ecx
or dword [edi + 0x21c0], 0xffffffff
mov cl, byte [esp + 0x16]
mov dword [edi + 0x30], eax
mov al, byte [esp + 0x18]
mov dword [edi + 0x2c], ebx
mov byte [esi + 0x39], al
mov byte [esi + 0x3a], cl
test al, al
jne 0x4a9793
test dl, dl
jne 0x4a9793
cmp byte [ebx + 0xb06c], dl
jne 0x4a9793
mov ecx, dword [ebx + 0x7638]
mov eax, dword [ebx + 0x763c]
mov edi, dword [ebx + 0x7644]
mov edx, dword [ebx + 0x7640]
shld eax, ecx, 0xb
shl ecx, 0xb
cmp eax, edi
jl 0x4a9788
jg 0x4a9747
cmp ecx, edx
jbe 0x4a9788
xor eax, eax
cmp edi, eax
jl 0x4a9770
jg 0x4a9757
cmp edx, 0x5f5e100
jb 0x4a9770
mov ecx, ebx
call fcn.004aacd1
cmp edx, dword [ebx + 0x763c]
jl 0x4a9788
jg 0x4a9770
cmp eax, dword [ebx + 0x7638]
jbe 0x4a9788
push dword [ebx + 0x7644]
lea ecx, [esp + 0x140]
push dword [ebx + 0x7640]
call fcn.004aabbd
mov dl, byte [esp + 0x17]
lea edi, [esi + 0x10]
mov cl, byte [esp + 0x16]
mov eax, dword [esi + 8]
cmp byte [eax + 0x5194], 0
sete byte [esp + 0x14f]
cmp byte [esp + 0x18], 0
jne 0x4a97bf
test cl, cl
jne 0x4a97bf
mov eax, dword [esp + 0x2c]
cmp word [esp + 0x28], ax
je 0x4a97bf
inc cl
jmp 0x4a97c3
xor eax, eax
mov cl, al
cmp byte [esp + 0x23], 0
mov al, 1
mov byte [esp + 0x1a], cl
mov byte [esp + 0x1b], 1
mov byte [esp + 0x19], al
je 0x4a98cc
mov edi, dword [ebx + 0x76e0]
cmp edi, 4
je 0x4a9833
cmp edi, 5
je 0x4a9833
cmp edi, 1
je 0x4a9806
cmp edi, 2
je 0x4a9806
cmp edi, 3
je 0x4a9806
mov byte [esp + 0x19], 0
jmp 0x4a98aa
test cl, cl
je 0x4a989d
cmp dword [ebx + 0xb058], 3
jne 0x4a982f
mov ecx, dword [esi + 8]
lea eax, [ebx + 0x65f0]
push eax
lea edx, [esi + 0x546e]
call fcn.004a8a81
pop ecx
jmp 0x4a9891
xor eax, eax
jmp 0x4a9895
push ecx
lea eax, [esp + 0x1168]
push eax
lea eax, [ebx + 0x76e4]
push eax
push ecx
mov ecx, esi
call fcn.004a9d49
mov cl, byte [esp + 0x1a]
test cl, cl
je 0x4a989d
cmp word [esp + 0x1164], 0
je 0x4a989d
push ecx
cmp edi, 4
jne 0x4a9878
lea edx, [esp + 0x1168]
lea ecx, [esi + 0x546e]
call fcn.004a860a
jmp 0x4a982c
lea eax, [esp + 0x1168]
push eax
push ecx
push ecx
lea eax, [esp + 0x14c]
mov ecx, esi
push eax
call fcn.004a9c29
mov cl, byte [esp + 0x1a]
mov byte [esp + 0x19], al
test al, al
je 0x4a98aa
cmp dword [ebx + 0xb058], 2
jne 0x4a98af
test cl, cl
jne 0x4a98b3
mov byte [esp + 0x1b], 0
test cl, cl
je 0x4a98bf
cmp byte [esp + 0x19], 0
je 0x4a98bf
xor eax, eax
inc eax
jmp 0x4a98c1
xor eax, eax
mov byte [esi + 0x546d], al
jmp 0x4a9951
cmp byte [ebx + 0x7678], 0
jne 0x4a9951
test dl, dl
jne 0x4a9951
cmp byte [ebx + 0x660a], dl
jne 0x4a98f8
push dword [ebx + 0x7644]
mov ecx, edi
push dword [ebx + 0x7640]
call fcn.004a9b90
pop ecx
pop ecx
jmp 0x4a9951
movzx eax, byte [ebx + 0x76d0]
mov ecx, dword [esi + 0x4458]
push eax
push dword [ebx + 0x76d4]
call fcn.004b56bd
mov eax, dword [esi + 0x4458]
mov ecx, dword [ebx + 0x7640]
mov edx, dword [ebx + 0x7644]
mov dword [eax + 0x4c40], ecx
mov dword [eax + 0x4c44], edx
mov byte [eax + 0x4c58], 0
movzx eax, byte [ebx + 0x76d0]
mov ecx, dword [esi + 0x4458]
push eax
movzx eax, byte [ebx + 0x6609]
push eax
call fcn.004b582b
mov ecx, ebx
call fcn.004a2cc0
cmp byte [ebx + 0x7679], 0
jne 0x4a998f
xor eax, eax
lea ecx, [ebx + 0x76ab]
cmp byte [ebx + 0x76aa], al
cmovne eax, ecx
lea ecx, [esi + 0x38e8]
push eax
lea eax, [ebx + 0x7650]
push eax
call fcn.004ab5d9
test al, al
je 0x4a998f
mov al, 1
xor ecx, ecx
jmp 0x4a9993
xor ecx, ecx
mov al, cl
cmp byte [ebx + 0x76d0], 0
jne 0x4a99a4
mov byte [esi + 0x446b], cl
jmp 0x4a99ca
cmp byte [ebx + 0x660a], 0
je 0x4a99ca
cmp dword [ebx + 0x7644], ecx
jl 0x4a99ca
jg 0x4a99bf
cmp dword [ebx + 0x7640], ecx
jbe 0x4a99ca
test al, al
je 0x4a99ca
mov byte [esi + 0x446b], 1
cmp byte [esp + 0x16], 0
mov dl, byte [esp + 0x17]
jne 0x4a9a1a
cmp byte [esp + 0x1b], 0
je 0x4a9a1a
test dl, dl
jne 0x4a99e4
test al, al
jne 0x4a9a1a
push 3
mov ecx, 0x511830
mov byte [esp + 0x1f], 1
call fcn.004a8593
mov ecx, dword [esi + 8]
mov dl, byte [esp + 0x17]
cmp dword [ecx + 0x82a0], 0xf
je 0x4a9a16
push 0xc
pop eax
push 0x18
test dl, dl
pop edi
cmovne eax, edi
mov dword [ecx + 0x82a0], eax
mov cl, byte [esp + 0x1b]
cmp byte [esp + 0x18], 0
jne 0x4a9b0c
test dl, dl
jne 0x4a9b0c
mov eax, dword [esp + 0x28]
push 0x58
pop edx
cmp ax, dx
je 0x4a9a45
push 0x45
pop edx
cmp ax, dx
jne 0x4a9b0c
cmp byte [esp + 0x23], 0
je 0x4a9a64
cmp dword [ebx + 0x76e0], 5
jne 0x4a9b0c
cmp byte [esp + 0x19], 0
je 0x4a9b0c
test cl, cl
je 0x4a9a85
mov eax, dword [esi + 8]
cmp byte [eax + 0x5194], 0
je 0x4a9b0c
push dword [esp + 0x140]
call dword [sym.imp.KERNEL32.DLL_SetEndOfFile]
mov eax, dword [esi + 8]
cmp byte [eax + 0x514c], 0
je 0x4a9a98
and dword [ebx + 0x660c], 0xffffffdf
mov ecx, dword [esi + 8]
lea eax, [ebx + 0x7630]
xor edx, edx
xor edi, edi
cmp dword [ecx + 0x6294], edi
cmove eax, edx
cmp dword [ecx + 0x6290], edi
push eax
lea eax, [ebx + 0x7628]
cmove eax, edx
cmp dword [ecx + 0x628c], edi
push eax
lea eax, [ebx + 0x7620]
cmove eax, edx
lea ecx, [esp + 0x144]
push eax
call fcn.004aac09
lea ecx, [esp + 0x13c]
call fcn.004aa81a
mov eax, dword [esi + 8]
cmp byte [eax + 0x519b], 0
jne 0x4a9b05
mov edx, dword [ebx + 0x660c]
lea ecx, [esp + 0x15a]
call fcn.004ab0e4
mov byte [esi + 0x546d], 1
lea ecx, [esp + 0x34]
call fcn.004adf22
or dword [esp + 0x31c8], 0xffffffff
lea ecx, [esp + 0x13c]
call fcn.004aa594
cmp byte [esp + 0x24], 0
mov eax, dword [esp + 0x1c]
mov cl, byte [esp + 0x16]
je 0x4a9b3e
inc dword [esi + 0x4464]
cmp byte [esi + 0x21d8], 0
jne 0x4a90c3
test al, al
jne 0x4a9b68
cmp byte [ebx + 0xb05c], al
jne 0x4a9b60
mov ecx, ebx
call fcn.004a2cc0
jmp 0x4a9b68
test cl, cl
je 0x4a90c3
mov al, 1
mov ecx, dword [esp + 0x31c0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x31a8]
xor ecx, esp
call fcn.00401000
mov esp, ebp
pop ebp
ret 0xc