Function at 0x499850
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x5452f6
push eax
mov dword fs:[0], esp
sub esp, 0x524
mov dword [0x5991d0], 0
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
push ebp
call ebx
mov ebp, dword [esp + 0x53c]
mov dword [0x5991d8], eax
test ebp, ebp
je 0x49a31c
cmp word [ebp], 0
je 0x49a31c
mov eax, dword [esp + 0x540]
test eax, eax
je 0x49a31c
cmp word [eax], 0
je 0x49a31c
mov eax, dword [0x5991dc]
test eax, eax
jne 0x4998d9
mov dword [0x5991d0], 2
mov dword [0x5991d4], 0x99a
jmp 0x49a330
push esi
push edi
xor edx, edx
mov ecx, 9
xor eax, eax
lea edi, [esp + 0x148]
mov dword [esp + 0x144], edx
mov dword [esp + 0x2c], edx
rep stosd dword es:[edi], eax
lea eax, [esp + 0x54]
mov dword [esp + 0x50], edx
push eax
push 0x60
push 1
push 7
push 0x80
push 0x120089
push ebp
mov dword [esp + 0x44], 0xffffffff
mov dword [esp + 0x70], edx
call fcn.004bff10
mov esi, eax
add esp, 0x1c
cmp esi, 0xffffffff
mov dword [esp + 0x3c], esi
jne 0x499969
cmp dword [esp + 0x54], 0xc0000034
je 0x49a0c1
push 0
push 0x60
push 1
push 7
push 0x80
push 0x120089
push ebp
call fcn.004bff10
mov esi, eax
add esp, 0x1c
cmp esi, 0xffffffff
mov dword [esp + 0x3c], esi
je 0x49a0de
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0xb5]
mov byte [esp + 0xb4], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0xb4]
push ecx
push esi
stosb byte es:[edi], al
call fcn.0049f7c0
add esp, 8
test eax, eax
je 0x49a0fb
lea edx, [esp + 0xb4]
test edx, edx
je 0x49a11b
push 0x10
lea eax, [esp + 0xb8]
push 0x57b748
push eax
call fcn.0042ee60
add esp, 0xc
test eax, eax
jne 0x49a11b
test byte [esp + 0xe6], 1
je 0x49a11b
mov eax, dword [esp + 0xd4]
lea ecx, [esp + 0x18]
xor ebp, ebp
push ecx
lea edx, [esp + 0x38]
push ebp
push edx
push ebp
push eax
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x48], ebp
call fcn.00495480
mov eax, dword [esp + 0x2c]
add esp, 0x14
cmp eax, ebp
jne 0x49a13b
mov ecx, 0x13
xor eax, eax
lea edi, [esp + 0xf8]
mov dword [esp + 0xf4], ebp
rep stosd dword es:[edi], eax
mov ecx, 0xd
lea edi, [esp + 0x80]
mov dword [esp + 0x7c], ebp
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x10]
call fcn.0051fff0
lea ecx, [esp + 0xf4]
lea edx, [esp + 0xb4]
push ecx
push edx
push esi
mov dword [esp + 0x548], ebp
call fcn.0049fa30
add esp, 0xc
test eax, eax
je 0x49a15b
mov ecx, 0xe1
xor eax, eax
lea edi, [esp + 0x1ad]
mov byte [esp + 0x1ac], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x1ac]
push eax
push esi
call fcn.0049bdc0
add esp, 8
test eax, eax
je 0x49a18f
lea ecx, [esp + 0x7c]
lea edx, [esp + 0xf4]
push ecx
lea eax, [esp + 0xb8]
push edx
push eax
push esi
call fcn.0049fcb0
add esp, 0x10
test eax, eax
je 0x49a1c3
cmp word [esp + 0x86], bp
jne 0x49a1f7
lea ecx, [esp + 0x1c]
call fcn.0051fff0
lea ecx, [esp + 0x24]
lea edx, [esp + 0x18]
push ecx
lea eax, [esp + 0x20]
push edx
lea ecx, [esp + 0xfc]
push eax
lea edx, [esp + 0xc0]
push ecx
push edx
push esi
mov byte [esp + 0x554], 1
mov dword [esp + 0x30], ebp
mov dword [esp + 0x3c], ebp
call fcn.0049ff00
add esp, 0x18
test eax, eax
je 0x49a22b
mov eax, dword [esp + 0x18]
xor ecx, ecx
mov di, word [eax + 0xc]
cmp di, bp
jbe 0x499b57
mov edx, dword [esp + 0x24]
mov eax, ecx
and eax, 0xffff
lea eax, [eax + eax*4]
test byte [edx + eax*8 + 8], 1
lea eax, [edx + eax*8]
je 0x499b51
mov eax, dword [eax]
cmp eax, 1
jb 0x49a270
cmp eax, 4
ja 0x49a270
inc ecx
cmp cx, di
jb 0x499b29
lea ecx, [esp + 0x1c]
mov byte [esp + 0x53c], 0
call fcn.00520150
lea ecx, [esp + 0x144]
push 0x28
push ecx
push esi
call fcn.004bf120
add esp, 0xc
test eax, eax
je 0x49a286
mov edi, dword [esp + 0x548]
push 0
push 0x60
push 3
push 1
push 0x80
push 0x120116
push edi
call fcn.004bff10
mov esi, eax
or ebp, 0xffffffff
add esp, 0x1c
cmp esi, ebp
mov dword [esp + 0x28], esi
jne 0x499be5
push 1
push 0
push edi
call fcn.004bf1a0
push 0
push 0x60
push 1
push 7
push 0x80
push 0x120116
push edi
call fcn.004bff10
mov esi, eax
add esp, 0x28
cmp esi, ebp
mov dword [esp + 0x28], esi
je 0x49a2a3
mov edx, dword [esp + 0x128]
mov dword [esp + 0x50], 1
push edx
call fcn.004c2d10
add esp, 4
mov dword [esp + 0x60], eax
test eax, eax
je 0x49a2b9
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x16d]
mov byte [esp + 0x16c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
lea ecx, [esp + 0x16c]
mov dword [esp + 0x40], eax
mov dword [esp + 0x74], eax
lea eax, [esp + 0x40]
lea edx, [esp + 0x74]
push eax
push 0x40
push ecx
lea eax, [esp + 0x100]
push edx
push eax
call fcn.004aabc0
add esp, 0x14
test eax, eax
je 0x49a2cf
push 0
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov eax, dword [esp + 0xa4]
test eax, eax
je 0x49a2ff
mov edi, dword [esp + 0xa8]
cmp eax, 1
jne 0x499c90
mov edi, dword [esp + 0xac]
mov ecx, dword [esp + 0x60]
push edi
mov edx, dword [ecx]
call dword [edx + 0xc]
mov esi, dword [0x57b744]
mov ecx, eax
mov eax, esi
xor edx, edx
div edi
mov dword [esp + 0x70], ecx
mov dword [esp + 0x34], esi
mov ebx, eax
mov eax, dword [esp + 0xa4]
imul ebx, ecx
cmp eax, 1
mov dword [esp + 0x44], ebx
je 0x499ccf
mov eax, esi
xor edx, edx
div edi
test edx, edx
je 0x499cdb
mov esi, edi
mov ebx, ecx
mov dword [esp + 0x34], esi
mov dword [esp + 0x44], ebx
push esi
call fcn.0052644a
push ebx
mov dword [esp + 0x40], eax
call fcn.0052644a
mov ecx, dword [esp + 0x44]
add esp, 8
xor ebp, ebp
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x118]
push ebp
push ebp
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, esi
xor edx, edx
div edi
mov dword [esp + 0x24], ebp
mov dword [esp + 0x30], ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x20], ebp
mov dword [esp + 0x78], eax
mov edi, dword [esp + 0x38]
mov ecx, esi
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x1c]
mov ecx, ebx
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x78]
mov eax, dword [esp + 0xa4]
lea ecx, [edi + ebp]
cmp ecx, eax
jb 0x499d81
mov edi, eax
mov eax, dword [esp + 0xac]
sub edi, ebp
mov dword [esp + 0x18], 1
lea esi, [edi - 1]
imul esi, dword [esp + 0xa8]
add esi, eax
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
push 0
lea edx, [esp + 0x4c]
push 0
push edx
push esi
push eax
push ecx
mov dword [esp + 0x60], 0
call fcn.004bf5a0
add esp, 0x18
test eax, eax
je 0x499fb4
cmp esi, dword [esp + 0x48]
jne 0x499fca
mov ebx, dword [esp + 0x38]
mov ebp, dword [esp + 0x1c]
mov dword [esp + 0x6c], edi
xor edi, edi
mov dword [esp + 0x5c], edi
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0xa4]
mov ecx, dword [esp + 0xa8]
inc eax
cmp eax, edx
mov dword [esp + 0x30], eax
mov dword [esp + 0x64], ecx
jne 0x499df3
mov ecx, dword [esp + 0xac]
mov dword [esp + 0x64], ecx
mov edx, dword [esp + 0xa0]
xor eax, eax
cmp eax, edx
mov dword [esp + 0x14], edi
ja 0x499e7a
jb 0x499e15
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x9c]
cmp edx, eax
jae 0x499e7a
lea eax, [esp + 0x4c]
lea edx, [esp + 0x68]
push eax
mov eax, dword [esp + 0x88]
push edx
push ecx
push ebx
push eax
mov dword [esp + 0x7c], edi
mov dword [esp + 0x60], edi
call fcn.004af970
add esp, 0x14
test eax, eax
je 0x499f88
lea eax, [esp + 0x14]
mov ecx, dword [esp + 0x60]
push eax
mov eax, dword [esp + 0x74]
push eax
mov eax, dword [esp + 0x54]
push ebp
mov edx, dword [ecx]
push eax
mov eax, dword [esp + 0x78]
push eax
mov eax, dword [esp + 0x54]
push eax
lea eax, [esp + 0x184]
push eax
call dword [edx + 0x14]
cmp eax, edi
je 0x499f9e
mov ecx, dword [esp + 0x14]
jmp 0x499ed6
mov ecx, dword [esp + 0xb0]
mov eax, dword [esp + 0x70]
cmp ecx, eax
mov dword [esp + 0x14], ecx
jbe 0x499e93
mov ecx, eax
mov dword [esp + 0x14], ecx
mov eax, dword [esp + 0x84]
and eax, 0xffff
sub eax, edi
je 0x499ebe
dec eax
je 0x499eae
dec eax
jne 0x499ed6
lea esi, [ebx + 8]
jmp 0x499ec0
mov eax, ecx
lea esi, [ebx + 4]
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
jmp 0x499ecb
mov esi, ebx
mov edx, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
xor edi, edi
mov eax, dword [esp + 0xa4]
mov edx, dword [esp + 0x30]
cmp edx, eax
jne 0x499f16
mov eax, dword [esp + 0x90]
mov ecx, dword [esp + 0x8c]
cmp eax, edi
ja 0x499eff
cmp ecx, 0x1000
jbe 0x499f12
and ecx, 0xfff
xor eax, eax
mov edx, ecx
or edx, eax
jne 0x499f12
mov ecx, 0x1000
mov dword [esp + 0x14], ecx
mov esi, dword [esp + 0x5c]
mov eax, dword [esp + 0x6c]
add esi, ecx
dec eax
mov dword [esp + 0x5c], esi
mov dword [esp + 0x6c], eax
je 0x499f38
mov edx, dword [esp + 0x64]
add ebx, edx
add ebp, ecx
jmp 0x499dc9
mov ebx, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x28]
lea eax, [esp + 0x58]
push edi
push eax
push esi
add ebx, esi
push ecx
push edx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x6c], edi
call fcn.004bf6a0
add esp, 0x14
test eax, eax
je 0x499fe0
cmp dword [esp + 0x58], esi
jb 0x499ff6
cmp dword [esp + 0x18], edi
jne 0x49a01d
mov ebx, dword [esp + 0x44]
mov esi, dword [esp + 0x34]
mov ebp, dword [esp + 0x30]
jmp 0x499d23
mov dword [0x5991d0], 0x1c
mov dword [0x5991d4], 0xaa3
jmp 0x49a00a
mov dword [0x5991d0], 0x12
mov dword [0x5991d4], 0xaac
jmp 0x49a00a
mov dword [0x5991d0], 0xd
mov dword [0x5991d4], 0xa7f
jmp 0x49a00a
mov dword [0x5991d0], 0xd
mov dword [0x5991d4], 0xa87
jmp 0x49a00a
mov dword [0x5991d0], 0xe
mov dword [0x5991d4], 0xad6
jmp 0x49a00a
mov dword [0x5991d0], 0xe
mov dword [0x5991d4], 0xade
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x5991d8], eax
mov dword [esp + 0x20], 1
mov eax, dword [esp + 0x38]
push eax
call fcn.00526473
mov ecx, dword [esp + 0x20]
push ecx
call fcn.00526473
mov eax, dword [esp + 0x20]
add esp, 8
test eax, eax
je 0x49a04c
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x49a04c
mov dword [esp + 0x2c], 1
lea ecx, [esp + 0x10]
mov dword [esp + 0x53c], 0xffffffff
call fcn.00520150
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x49a07f
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x144]
push 0x28
push edx
push eax
call fcn.004bf160
add esp, 0xc
mov eax, dword [esp + 0x3c]
cmp eax, 0xffffffff
je 0x49a08f
push eax
call dword [0x59a140]
mov eax, dword [esp + 0x28]
cmp eax, 0xffffffff
je 0x49a09f
push eax
call dword [0x59a140]
mov eax, dword [esp + 0x2c]
test eax, eax
jne 0x49a0c1
mov eax, dword [esp + 0x50]
test eax, eax
je 0x49a0c1
mov ecx, dword [esp + 0x548]
push 1
push ecx
call fcn.004bf4a0
add esp, 8
mov eax, dword [esp + 0x2c]
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x524]
mov dword fs:[0], ecx
add esp, 0x530
ret
mov dword [0x5991d0], 3
mov dword [0x5991d4], 0x9bf
call ebx
mov dword [0x5991d8], eax
jmp 0x49a0c1
mov dword [0x5991d0], 0xf
mov dword [0x5991d4], 0x9c7
call ebx
mov dword [0x5991d8], eax
jmp 0x49a07f
mov dword [0x5991d0], 0x22
mov dword [0x5991d4], 0x9ce
call ebx
mov dword [0x5991d8], eax
jmp 0x49a07f
mov dword [0x5991d0], 0x31
mov dword [0x5991d4], 0x9d5
call ebx
mov dword [0x5991d8], eax
jmp 0x49a07f
mov dword [0x5991d0], 0x14
mov dword [0x5991d4], 0x9e1
call ebx
lea ecx, [esp + 0x10]
mov dword [0x5991d8], eax
mov dword [esp + 0x53c], 0xffffffff
call fcn.00520150
jmp 0x49a07f
mov dword [0x5991d0], 0x1f
mov dword [0x5991d4], 0x9e9
call ebx
lea ecx, [esp + 0x10]
mov dword [0x5991d8], eax
mov dword [esp + 0x53c], 0xffffffff
call fcn.00520150
jmp 0x49a07f
mov dword [0x5991d0], 0x14
mov dword [0x5991d4], 0x9ef
call ebx
lea ecx, [esp + 0x10]
mov dword [0x5991d8], eax
mov dword [esp + 0x53c], 0xffffffff
call fcn.00520150
jmp 0x49a07f
mov dword [0x5991d0], 1
mov dword [0x5991d4], 0x9f6
call ebx
lea ecx, [esp + 0x10]
mov dword [0x5991d8], eax
mov dword [esp + 0x53c], 0xffffffff
call fcn.00520150
jmp 0x49a07f
mov dword [0x5991d0], 0x14
mov dword [0x5991d4], 0xa00
call ebx
lea ecx, [esp + 0x1c]
mov dword [0x5991d8], eax
mov byte [esp + 0x53c], 0
call fcn.00520150
lea ecx, [esp + 0x10]
mov dword [esp + 0x53c], 0xffffffff
call fcn.00520150
jmp 0x49a07f
mov dword [0x5991d0], 0x32
mov dword [0x5991d4], 0xa06
jmp 0x49a23f
mov dword [0x5991d0], 5
mov dword [0x5991d4], 0xa15
call ebx
mov dword [0x5991d8], eax
jmp 0x49a257
mov dword [0x5991d0], 4
mov dword [0x5991d4], 0xa31
jmp 0x49a2e3
mov dword [0x5991d0], 0xc
mov dword [0x5991d4], 0xa3c
jmp 0x49a2e3
mov dword [0x5991d0], 0xb
mov dword [0x5991d4], 0xa45
call ebx
lea ecx, [esp + 0x10]
mov dword [0x5991d8], eax
mov dword [esp + 0x53c], ebp
call fcn.00520150
jmp 0x49a07f
lea ecx, [esp + 0x10]
mov dword [esp + 0x2c], 1
mov dword [esp + 0x53c], ebp
call fcn.00520150
jmp 0x49a068
mov dword [0x5991d0], 1
mov dword [0x5991d4], 0x994
call ebx
mov ecx, dword [esp + 0x52c]
mov dword [0x5991d8], eax
pop ebp
xor eax, eax
pop ebx
mov dword fs:[0], ecx
add esp, 0x530
ret