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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x34
mov eax, dword [0x5c04b4]
xor eax, esp
mov dword [esp + 0x30], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ebx, ecx
push 0x1bf0
push 0
push edi
call sub.MSVCR120.dll_memset
mov dword [edi], 0x1bf0
add esp, 0xc
mov eax, dword [ebx + 0x9da4]
mov eax, dword [eax + 0x654]
and eax, 0xff
cmp eax, 1
je 0x49a9d3
cmp eax, 2
je 0x49a9d3
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.00553510
mov esp, ebp
pop ebp
ret 8
lea eax, [ebx + 0x1460]
push eax
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [ebx + 0x1d0], 0xffffffff
lea eax, [ebx + 0x1d0]
jne 0x49aa1a
lea esi, [ebx + 0x78]
mov ecx, esi
call fcn.0044a2f0
test eax, eax
jne 0x49aa14
push esi
mov ecx, ebx
call fcn.004762c0
test eax, eax
jne 0x49aa14
xor ebx, ebx
jmp 0x49adf6
lea eax, [ebx + 0x1d0]
xor ecx, ecx
lea esi, [edi + 0x44]
mov dword [esi], ecx
xor edx, edx
mov dword [esi + 4], ecx
mov dword [esi + 8], ecx
mov dword [esi + 0xc], ecx
mov dword [edi + 0x1ad8], edx
mov dword [edi + 0x1adc], edx
mov dword [edi + 0x1ae0], edx
mov dword [edi + 0x1ae4], edx
mov ecx, dword [eax]
test ecx, ecx
je 0x49aaf8
cmp ecx, 0xffffffff
je 0x49aaf8
mov esi, dword [sym.imp.MSVCR120.dll__localtime32_s]
push eax
lea eax, [esp + 0x1c]
push eax
call esi
movzx eax, word [esp + 0x2c]
mov word [edi + 0x4a], ax
mov eax, dword [esp + 0x30]
inc eax
mov word [edi + 0x46], ax
mov eax, dword [esp + 0x34]
add eax, 0x76c
mov word [edi + 0x44], ax
movzx eax, word [esp + 0x28]
mov word [edi + 0x4c], ax
movzx eax, word [esp + 0x24]
mov word [edi + 0x4e], ax
mov eax, dword [ebx + 0x1c94]
add eax, dword [ebx + 0x1d0]
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x24]
push eax
call esi
movzx eax, word [esp + 0x34]
lea esi, [edi + 0x44]
mov word [edi + 0x1ade], ax
add esp, 0x10
mov eax, dword [esp + 0x28]
inc eax
mov word [edi + 0x1ada], ax
mov eax, dword [esp + 0x2c]
add eax, 0x76c
mov word [edi + 0x1ad8], ax
movzx eax, word [esp + 0x20]
mov word [edi + 0x1ae0], ax
movzx eax, word [esp + 0x1c]
mov word [edi + 0x1ae2], ax
lea ecx, [ebx + 0x78]
lea eax, [ecx + 2]
lea edx, [edi + 4]
mov dword [esp + 0x10], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x49ab05
sub ecx, dword [esp + 0x10]
lea eax, [ebx + 0x78]
sar ecx, 1
cmp ecx, 0x20
jae 0x49ab2d
push eax
push 0x20
push edx
call dword [sym.imp.MSVCR120.dll_wcscpy_s]
add esp, 0xc
jmp 0x49ab42
push 0x1f
push eax
push 0x20
push edx
call dword [sym.imp.MSVCR120.dll_wcsncpy_s]
add esp, 0x10
xor eax, eax
mov word [edi + 0x42], ax
lea ecx, [ebx + 0x1dc]
lea eax, [ecx + 2]
lea edx, [edi + 0xa6c]
mov dword [esp + 0x10], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x49ab55
sub ecx, dword [esp + 0x10]
lea eax, [ebx + 0x1dc]
sar ecx, 1
cmp ecx, 0x30
jae 0x49ab80
push eax
push 0x30
push edx
call dword [sym.imp.MSVCR120.dll_wcscpy_s]
add esp, 0xc
jmp 0x49ab98
push 0x2f
push eax
push 0x30
push edx
call dword [sym.imp.MSVCR120.dll_wcsncpy_s]
add esp, 0x10
xor eax, eax
mov word [edi + 0xaca], ax
mov eax, dword [ebx + 0x1d4]
lea ecx, [ebx + 0x248]
mov dword [edi + 0x58], eax
lea edx, [edi + 0x6c]
mov eax, dword [ebx + 0x1d8]
mov dword [edi + 0x5c], eax
lea eax, [ecx + 2]
mov dword [esp + 0x10], eax
lea ebx, [ebx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x49abc0
sub ecx, dword [esp + 0x10]
lea eax, [ebx + 0x248]
sar ecx, 1
cmp ecx, 0x400
jae 0x49abf1
push eax
push 0x400
push edx
call dword [sym.imp.MSVCR120.dll_wcscpy_s]
add esp, 0xc
jmp 0x49ac0f
push 0x3ff
push eax
push 0x400
push edx
call dword [sym.imp.MSVCR120.dll_wcsncpy_s]
add esp, 0x10
xor eax, eax
mov word [edi + 0x86a], ax
lea ecx, [ebx + 0xa48]
lea eax, [ecx + 2]
lea edx, [edi + 0x86c]
mov dword [esp + 0x10], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x49ac22
sub ecx, dword [esp + 0x10]
lea eax, [ebx + 0xa48]
sar ecx, 1
cmp ecx, 0x100
jae 0x49ac53
push eax
push 0x100
push edx
call dword [sym.imp.MSVCR120.dll_wcscpy_s]
add esp, 0xc
jmp 0x49ac71
push 0xff
push eax
push 0x100
push edx
call dword [sym.imp.MSVCR120.dll_wcsncpy_s]
add esp, 0x10
xor eax, eax
mov word [edi + 0xa6a], ax
lea ecx, [ebx + 0xc48]
lea eax, [ecx + 2]
lea edx, [edi + 0xacc]
mov dword [esp + 0x10], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x49ac84
sub ecx, dword [esp + 0x10]
lea eax, [ebx + 0xc48]
sar ecx, 1
cmp ecx, 0x400
jae 0x49acb5
push eax
push 0x400
push edx
call dword [sym.imp.MSVCR120.dll_wcscpy_s]
add esp, 0xc
jmp 0x49acd3
push 0x3ff
push eax
push 0x400
push edx
call dword [sym.imp.MSVCR120.dll_wcsncpy_s]
add esp, 0x10
xor eax, eax
mov word [edi + 0x12ca], ax
mov eax, dword [ebx + 0x144c]
lea ecx, [ebx + 0x1494]
mov dword [edi + 0x12cc], eax
lea edx, [edi + 0x12d8]
mov eax, dword [ebx + 0x240]
mov dword [edi + 0x64], eax
mov eax, dword [ebx + 0x23c]
mov dword [edi + 0x60], eax
mov eax, dword [ebx + 0x244]
mov dword [edi + 0x68], eax
mov eax, dword [ebx + 0x1448]
mov dword [edi + 0x12d0], eax
mov eax, dword [ebx + 0x1490]
mov dword [edi + 0x12d4], eax
lea eax, [ecx + 2]
mov dword [esp + 0x10], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x49ad25
sub ecx, dword [esp + 0x10]
lea eax, [ebx + 0x1494]
sar ecx, 1
cmp ecx, 0x400
jae 0x49ad56
push eax
push 0x400
push edx
call dword [sym.imp.MSVCR120.dll_wcscpy_s]
add esp, 0xc
jmp 0x49ad74
push 0x3ff
push eax
push 0x400
push edx
call dword [sym.imp.MSVCR120.dll_wcsncpy_s]
add esp, 0x10
xor eax, eax
mov word [edi + 0x1ad6], ax
mov eax, dword [ebx + 0x33dc]
shr eax, 4
test al, 1
je 0x49ad9a
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov dword [edi + 0x12d4], 5
jmp 0x49adbe
cmp byte [ebp + 0xc], 0
je 0x49adcb
cmp dword [edi + 0x58], 2
je 0x49adcb
mov ecx, ebx
call fcn.00499280
test al, al
jne 0x49adcb
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov dword [edi + 0x58], eax
mov dword [edi + 0x1ae8], 0x80000000
push esi
call fcn.0049c810
mov dword [edi + 0x1ae8], eax
lea eax, [edi + 0x1ad8]
push eax
call fcn.0049c810
push edi
mov ecx, ebx
mov dword [edi + 0x1aec], eax
call fcn.00476220
mov ebx, 1
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [0x5c04d8]
cmp ecx, 0x5c04d8
je 0x49ae3a
test byte [ecx + 0x1c], 1
je 0x49ae3a
cmp byte [ecx + 0x19], 5
jb 0x49ae3a
push dword [edi + 0x1aec]
push dword [edi + 0x1ae8]
push dword [edi + 0x12cc]
push dword [ecx + 0x14]
push dword [ecx + 0x10]
call fcn.00499090
add esp, 0x14
mov ecx, dword [esp + 0x3c]
mov eax, ebx
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00553510
mov esp, ebp
pop ebp
ret 8