Function at 0x10038514
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
mov eax, dword [ebp + 8]
push ebx
push esi
or ebx, 0xffffffff
push edi
xor edi, edi
mov esi, ebx
push 0x100b4e88
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x24], edi
call dword [sym.imp.MSVCRT.dll_getenv]
test eax, eax
pop ecx
jne 0x10038567
push str.TZGMT
call dword [sym.imp.MSVCRT.dll__putenv]
pop ecx
mov eax, dword [ebp + 8]
cmp byte [eax], 0
je 0x10038800
cmp dword [ebp - 0x24], 6
jge 0x10038800
and byte [ebp - 1], 0
lea eax, [ebp + 8]
push eax
call fcn.10038945
mov eax, dword [sym.imp.MSVCRT.dll___mb_cur_max]
pop ecx
cmp dword [eax], 1
jle 0x100385ab
mov eax, dword [ebp + 8]
push 0x103
movsx eax, byte [eax]
push eax
call dword [sym.imp.MSVCRT.dll__isctype]
pop ecx
pop ecx
jmp 0x100385c2
mov eax, dword [ebp + 8]
mov ecx, dword [sym.imp.MSVCRT.dll__pctype]
movsx eax, byte [eax]
mov ecx, dword [ecx]
mov ax, word [ecx + eax*2]
and eax, 0x103
cmp eax, edi
je 0x10038656
mov al, byte [0x100bebb0]
push 7
mov byte [ebp - 0x58], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x57]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x58]
push eax
push str._31_A_Za_z_
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll_sscanf]
lea eax, [ebp - 0x58]
push eax
call sub.MSVCRT.dll_strlen
add esp, 0x10
cmp dword [ebp - 0x34], ebx
mov edi, eax
jne 0x10038617
lea eax, [ebp - 0x58]
push edi
push eax
call fcn.100388ae
pop ecx
cmp eax, ebx
pop ecx
mov dword [ebp - 0x34], eax
jne 0x1003864c
cmp esi, ebx
jne 0x1003862e
lea eax, [ebp - 0x58]
push eax
call fcn.100388e7
mov esi, eax
pop ecx
cmp esi, ebx
mov dword [ebp - 0x18], esi
jne 0x1003864c
cmp dword [ebp - 8], ebx
jne 0x100388a7
lea eax, [ebp - 0x58]
push eax
call fcn.10038914
cmp eax, ebx
pop ecx
mov dword [ebp - 8], eax
je 0x100388a7
add dword [ebp + 8], edi
xor edi, edi
jmp 0x100387f8
mov eax, dword [sym.imp.MSVCRT.dll___mb_cur_max]
cmp dword [eax], 1
jle 0x10038673
mov eax, dword [ebp + 8]
push 4
movsx eax, byte [eax]
push eax
call dword [sym.imp.MSVCRT.dll__isctype]
pop ecx
pop ecx
jmp 0x10038687
mov eax, dword [ebp + 8]
mov ecx, dword [sym.imp.MSVCRT.dll__pctype]
movsx eax, byte [eax]
mov ecx, dword [ecx]
mov al, byte [ecx + eax*2]
and eax, 4
cmp eax, edi
je 0x100387f8
cmp dword [ebp - 0x14], ebx
jne 0x100386bf
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x2c]
push eax
push str._02d:_02d:_02d
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll_sscanf]
add esp, 0x14
cmp eax, 3
jne 0x100386bf
add dword [ebp + 8], 8
jmp 0x100387f8
lea eax, [ebp - 0x20]
push 0xa
push eax
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll_strtol]
add esp, 0xc
cmp dword [ebp - 8], ebx
mov ecx, eax
mov eax, dword [ebp + 8]
jne 0x10038739
mov edx, dword [ebp - 0x20]
sub edx, eax
cmp edx, 4
jne 0x10038739
cmp ecx, 0x514
jge 0x10038739
cmp dword [ebp - 0x38], eax
jae 0x10038739
mov bl, byte [eax - 1]
cmp bl, 0x2b
je 0x100386ff
cmp bl, 0x2d
jne 0x10038734
mov eax, ecx
push 0x64
cdq
pop esi
mov byte [ebp - 1], 1
idiv esi
mov edi, eax
mov eax, ecx
cdq
imul edi, edi, 0x3c
idiv esi
add edi, edx
imul edi, edi, 0x3c
cmp bl, 0x2b
mov dword [ebp - 8], edi
jne 0x10038731
mov esi, dword [ebp - 0x18]
mov eax, edi
neg eax
mov dword [ebp - 8], eax
or ebx, 0xffffffff
jmp 0x10038737
mov esi, dword [ebp - 0x18]
or ebx, 0xffffffff
xor edi, edi
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp + 8]
cmp eax, 8
jne 0x10038785
cmp dword [ebp - 0xc], ebx
jne 0x10038785
cmp esi, ebx
jne 0x10038785
cmp dword [ebp - 0x10], ebx
jne 0x10038785
mov eax, ecx
mov esi, 0x2710
cdq
mov edi, esi
push 0x64
idiv edi
mov byte [ebp - 1], 1
mov dword [ebp - 0xc], eax
mov eax, ecx
cdq
idiv esi
pop esi
push 0x64
pop edi
mov eax, edx
cdq
idiv esi
mov esi, eax
mov eax, ecx
cdq
idiv edi
dec esi
xor edi, edi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x10], edx
cmp byte [ebp - 1], 0
jne 0x100387f2
cmp dword [ebp - 0x1c], edi
jne 0x100387b6
cmp dword [ebp - 0x10], ebx
jne 0x100388a7
cmp ecx, edi
jle 0x100387a9
cmp ecx, 0x20
jge 0x100387a9
mov dword [ebp - 0x10], ecx
mov byte [ebp - 1], 1
cmp byte [ebp - 1], 0
mov dword [ebp - 0x1c], 1
jne 0x100387f2
cmp dword [ebp - 0x1c], 1
jne 0x100388a7
cmp dword [ebp - 0xc], ebx
jne 0x100388a7
cmp ecx, 0x76c
mov dword [ebp - 0xc], ecx
jge 0x100387ea
cmp ecx, 0x46
jle 0x100387e1
add ecx, 0x76c
jmp 0x100387e7
add ecx, 0x7d0
mov dword [ebp - 0xc], ecx
cmp dword [ebp - 0x10], ebx
jne 0x100387f2
mov dword [ebp - 0x1c], edi
mov eax, dword [ebp - 0x20]
mov dword [ebp + 8], eax
inc dword [ebp - 0x24]
jmp 0x10038567
cmp dword [ebp - 0x14], ebx
jne 0x1003880e
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x14], edi
mov ecx, dword [ebp - 0x10]
cmp ecx, ebx
je 0x100388a7
cmp esi, ebx
je 0x100388a7
mov eax, dword [ebp - 0xc]
cmp eax, ebx
je 0x100388a7
cmp eax, 0x7f5
jle 0x10038836
mov eax, accept
jmp 0x100388a9
mov edx, dword [ebp - 0x14]
add eax, 0xfffff894
mov dword [ebp - 0x7c], edx
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x78], edx
mov edx, dword [ebp - 0x2c]
lea eax, [ebp - 0x7c]
mov dword [ebp - 0x6c], esi
mov esi, dword [sym.imp.MSVCRT.dll_mktime]
push eax
mov dword [ebp - 0x74], edx
mov dword [ebp - 0x70], ecx
mov dword [ebp - 0x64], edi
mov dword [ebp - 0x60], edi
mov dword [ebp - 0x5c], edi
call esi
cmp eax, ebx
pop ecx
mov dword [ebp - 0x30], eax
je 0x100388a9
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.MSVCRT.dll_gmtime]
test eax, eax
pop ecx
je 0x100388a7
push eax
call esi
pop ecx
mov ecx, dword [ebp - 8]
inc ecx
neg ecx
sbb ecx, ecx
and ecx, dword [ebp - 8]
sub ecx, eax
mov eax, dword [ebp - 0x30]
add ecx, eax
test ecx, ecx
jle 0x100388a3
lea edx, [ecx + eax]
cmp edx, eax
jl 0x100388a7
add eax, ecx
jmp 0x100388a9
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret