Function at 0x403e40
Capabilities:
Get system information on windows
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
mov dword [esp], 0x42b0a4
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov ebx, dword [sym.imp.KERNEL32.dll_GetSystemInfo]
sub esp, 4
mov dword [esp], 0x42b080
call ebx
mov eax, dword [0x42b084]
sub esp, 4
mov dword [0x42b070], eax
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov edx, eax
not edx
shr edx, 0x1f
mov dword [0x42b05c], edx
xor edx, edx
test eax, eax
jns 0x403e95
xor edx, edx
test al, 0xfc
sete dl
mov dword [esp], str.GC_PRINT_VERBOSE_STATS
or dword [0x42b36c], edx
call sub.msvcrt.dll_getenv
test eax, eax
je 0x4049cc
mov dword [0x42b370], 2
mov dword [esp], str.GC_DUMP_REGULARLY
call sub.msvcrt.dll_getenv
test eax, eax
je 0x403ed3
mov dword [0x42b06c], 1
mov dword [esp], str.GC_FIND_LEAK
call sub.msvcrt.dll_getenv
test eax, eax
je 0x403eed
mov dword [0x42b0e8], 1
mov dword [esp], str.GC_FINDLEAK_DELAY_FREE
call sub.msvcrt.dll_getenv
test eax, eax
je 0x403f07
mov dword [0x42b068], 1
mov dword [esp], str.GC_ALL_INTERIOR_POINTERS
call sub.msvcrt.dll_getenv
test eax, eax
je 0x403f21
mov dword [0x42b384], 1
mov dword [esp], str.GC_DONT_GC
call sub.msvcrt.dll_getenv
test eax, eax
je 0x403f3b
mov dword [0x42b0f8], 1
mov dword [esp], str.GC_PRINT_BACK_HEIGHT
call sub.msvcrt.dll_getenv
test eax, eax
je 0x403f55
mov dword [0x42b064], 1
mov dword [esp], str.GC_NO_BLACKLIST_WARNING
call sub.msvcrt.dll_getenv
test eax, eax
je 0x403f6f
mov dword [0x422820], 0x7fffffff
mov dword [esp], str.GC_TRACE
call sub.msvcrt.dll_getenv
test eax, eax
je 0x403f94
mov dword [esp + 4], 0
mov dword [esp], str.GC_Warning:_Tracing_not_enabled:_Ignoring_GC_TRACE_value_n
call dword [0x422830]
mov dword [esp], str.GC_PAUSE_TIME_TARGET
call sub.msvcrt.dll_getenv
test eax, eax
je 0x403fb5
mov dword [esp], eax
call sub.msvcrt.dll_atol
test eax, eax
jle 0x403fb5
mov dword [0x420028], eax
mov dword [esp], str.GC_FULL_FREQUENCY
call sub.msvcrt.dll_getenv
test eax, eax
je 0x403fd6
mov dword [esp], eax
call sub.msvcrt.dll_atoi
test eax, eax
jle 0x403fd6
mov dword [0x420024], eax
mov dword [esp], str.GC_LARGE_ALLOC_WARN_INTERVAL
call sub.msvcrt.dll_getenv
test eax, eax
je 0x403ffb
mov dword [esp], eax
call sub.msvcrt.dll_atol
test eax, eax
jle 0x404337
mov dword [0x422820], eax
mov dword [esp], str.GC_FREE_SPACE_DIVISOR
call sub.msvcrt.dll_getenv
test eax, eax
je 0x40401c
mov dword [esp], eax
call sub.msvcrt.dll_atoi
test eax, eax
jle 0x40401c
mov dword [0x422828], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x44], eax
call eax
mov dword [0x447df8], eax
mov eax, dword [0x42b384]
test eax, eax
je 0x40403e
mov dword [0x4226fc], 0xfffffffc
mov edx, 0x447d94
mov eax, 0x42b3a0
call sym._GC_exclude_static_roots_inner.lto_priv.87
mov eax, 0x4226e0
mov edx, 0x422820
call sym._GC_exclude_static_roots_inner.lto_priv.87
mov eax, dword [0x42b060]
test eax, eax
je 0x404950
mov eax, 0x100c
call sym._GC_scratch_alloc.lto_priv.63
mov dword [0x42b414], eax
test eax, eax
je 0x404b71
lea edi, [eax + 4]
mov dword [eax], 0
mov dword [eax + 0x1008], 0
and edi, 0xfffffffc
sub eax, edi
lea ecx, [eax + 0x100c]
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov edx, dword [0x42b414]
lea esi, [esi]
nop
mov dword [eax*4 + 0x446d94], edx
add eax, 1
cmp eax, 0x400
jne 0x4040b0
mov eax, dword [0x42b100]
test eax, eax
je 0x404785
cmp dword [0x42b370], 2
je 0x404ae3
test word [0x42b070], 0xfff
jne 0x4047e9
call sym._detect_GetWriteWatch.lto_priv.89
mov eax, dword [0x42b364]
test eax, eax
je 0x404a00
mov eax, dword [0x42b370]
test eax, eax
jne 0x404ad2
mov dword [0x42b100], 1
mov esi, dword [0x42b36c]
test esi, esi
je 0x404273
mov eax, dword [0x42b070]
mov esi, dword [0x42b088]
neg eax
mov edi, eax
and edi, 0x42282c
add eax, edi
cmp eax, esi
jb 0x40418e
cmp edi, eax
jb 0x40418e
lea ebx, [ebp - 0x34]
jmp 0x404171
mov edx, dword [ebp - 0x30]
test edx, edx
je 0x40418e
mov eax, edx
sub eax, dword [0x42b070]
mov edi, edx
cmp edx, eax
jb 0x4049ef
cmp eax, esi
jb 0x4049ef
mov dword [esp + 8], 0x1c
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
cmp eax, 0x1c
je 0x404150
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x40], edi
lea esi, [esi]
lea esi, [esi]
nop
mov ebx, edi
cmp dword [0x42b08c], edi
jbe 0x404260
lea eax, [ebp - 0x34]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], eax
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
cmp eax, 0x1c
jne 0x404260
mov edx, dword [ebp - 0x30]
test edx, edx
je 0x404260
mov eax, dword [0x42b314]
cmp eax, dword [0x420020]
jbe 0x4041ef
mov dword [0x420020], eax
mov eax, dword [0x42b054]
test eax, eax
je 0x40420b
cmp dword [eax], edx
jne 0x404204
jmp 0x404260
cmp edx, dword [eax]
je 0x404260
mov eax, dword [eax + 4]
test eax, eax
jne 0x404200
mov ecx, dword [0x42b42c]
test ecx, ecx
jle 0x404240
cmp edx, dword [0x43f594]
je 0x404260
xor eax, eax
jmp 0x404239
cmp edx, dword [eax*4 + 0x43f594]
je 0x404260
add eax, 1
cmp eax, ecx
jne 0x404230
mov esi, dword [ebp - 0x28]
add esi, edi
cmp dword [ebp - 0x24], 0x1000
je 0x404620
mov edi, esi
cmp esi, ebx
jae 0x4041a0
lea esi, [esi]
mov eax, dword [ebp - 0x40]
mov esi, dword [ebp - 0x3c]
cmp eax, esi
je 0x404273
xor ecx, ecx
mov edx, esi
call sym._GC_add_roots_inner.lto_priv.90
mov ebx, dword [0x42b384]
test ebx, ebx
je 0x404717
call sym._GC_scratch_alloc.constprop.52
mov dword [0x42b380], eax
call sym._GC_scratch_alloc.constprop.52
mov ebx, eax
mov dword [0x42b37c], eax
mov eax, dword [0x42b380]
test ebx, ebx
je 0x404b44
test eax, eax
je 0x404b44
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._memset
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
mov dword [esp], ebx
call sym._memset
mov eax, 0x1000
call sym._alloc_mark_stack.lto_priv.88
mov dword [esp], str.GC_INITIAL_HEAP_SIZE
call sub.msvcrt.dll_getenv
mov esi, eax
test eax, eax
je 0x40436b
cmp byte [eax], 0
je case.0x404330.1
lea ebx, [ebp - 0x34]
mov dword [esp + 8], 0xa
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.msvcrt.dll_strtoul
mov edx, dword [ebp - 0x34]
mov edi, eax
movzx eax, byte [edx]
test al, al
je 0x404351
cmp byte [edx + 1], 0
jne case.0x404330.1
sub eax, 0x47
cmp al, 0x26
ja case.0x404330.1
movzx eax, al
jmp dword [eax*4 + 0x423a88]
mov dword [esp + 4], 0
mov dword [esp], str.GC_Warning:_GC_LARGE_ALLOC_WARN_INTERVAL_environment_variable_has_bad_value___ignoring_n
call dword [0x422830]
jmp 0x403ffb
cmp edi, 0xffffffff
jne 0x4047a9
mov dword [esp + 4], esi
mov dword [esp], str.GC_Warning:_Bad_initial_heap_size__s___ignoring_n
call dword [0x422830]
mov dword [esp], str.GC_MAXIMUM_HEAP_SIZE
mov edi, 0x10000
call sub.msvcrt.dll_getenv
mov esi, eax
mov eax, 0x10
test esi, esi
je 0x4046eb
cmp byte [esi], 0
je case.0x4047d3.1
lea ebx, [ebp - 0x34]
mov dword [esp + 8], 0xa
mov dword [esp + 4], ebx
mov dword [esp], esi
call sub.msvcrt.dll_strtoul
mov ecx, dword [ebp - 0x34]
movzx edx, byte [ecx]
test dl, dl
jne 0x4046c3
cmp edi, eax
seta dl
cmp eax, 0xffffffff
sete cl
or edx, ecx
test dl, dl
jne case.0x4047d3.1
mov edx, dword [0x447dec]
test edx, edx
je 0x4047da
mov dword [0x42b0f0], eax
test edi, edi
jne 0x4046e6
mov ebx, dword [0x42b384]
mov edx, 0x100
sub edx, ebx
test ebx, ebx
je 0x40465b
mov esi, 0x42e590
mov ecx, 0x400
mov eax, 0x1010101
mov edi, esi
rep stosd dword es:[edi], eax
cmp byte [0x42e590], 0
jne 0x404428
mov byte [0x42e590], 1
mov byte [0x42b578], 1
mov dword [0x42c188], 1
test edx, edx
je 0x404462
lea esi, [ebx + 7]
mov eax, esi
not eax
cmp eax, 1
ja 0x40467c
mov eax, 1
lea esi, [esi]
nop
mov dword [eax*4 + 0x42c188], 0x1fffffff
add eax, 1
cmp eax, edx
jbe 0x404450
mov dword [0x42b0e4], 1
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esp], 0x4239af
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [0x42b050], esi
sub esp, 4
test eax, eax
je 0x4046b0
mov dword [esp + 4], str.IsWow64Process
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
sub esp, 8
mov edi, eax
test eax, eax
je 0x4046b0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea ebx, [ebp - 0x34]
mov dword [esp + 4], ebx
mov dword [esp], eax
call edi
sub esp, 8
test eax, eax
jne 0x404843
xor eax, eax
mov dword [0x42b04c], eax
mov eax, dword [0x42b060]
mov edx, esi
mov dword [ebp - 0x34], eax
mov eax, ebx
call sym._GC_register_my_thread_inner.lto_priv.91
mov esi, dword [0x42b06c]
test esi, esi
jne 0x4049f6
mov ebx, dword [0x42b0f8]
test ebx, ebx
jne 0x404600
mov eax, dword [0x42b370]
mov ecx, dword [0x42b100]
mov dword [ebp - 0x40], eax
test ecx, ecx
je 0x40454b
mov edx, dword [0x42b420]
test edx, edx
je 0x40454b
test eax, eax
jne 0x404b33
lea esi, [esi]
lea esi, [esi]
mov eax, 1
call sym._GC_collect_a_little_inner.lto_priv.82
mov eax, dword [0x42b420]
test eax, eax
jne 0x404530
mov eax, dword [0x42b370]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x48], 0
test eax, eax
je 0x404574
mov dword [esp], 0x423a08
call sym._GC_log_printf
mov eax, dword [ebp - 0x44]
call eax
mov dword [ebp - 0x40], 1
mov dword [ebp - 0x48], eax
call sym._GC_promote_black_lists.lto_priv.94
mov edi, dword [0x42b0e8]
test edi, edi
jne 0x40484b
mov eax, dword [0x42b3ec]
mov dword [esp + 4], 0
mov dword [esp], sym._clear_marks_for_block.lto_priv.60
mov dword [0x42b420], 5
sub eax, 8
mov dword [0x42b3f4], eax
call sym._GC_apply_to_all_blocks.constprop.57
mov eax, sym._GC_never_stop_func.lto_priv.66
mov dword [0x42b3fc], 0
mov dword [0x42b420], 5
mov dword [0x42b418], 0
mov dword [0x42b048], 1
call sym._GC_stopped_mark.lto_priv.93
test eax, eax
jne 0x404800
mov esi, dword [0x42b100]
test esi, esi
je 0x404a8e
lea esi, [esi]
mov eax, dword [0x42b0e8]
test eax, eax
jne 0x404703
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x20]
lea edx, [eax - 4]
and edx, 0xfffffffb
je 0x404637
sub eax, 0x40
and eax, 0xffffffbf
jne 0x404252
mov edx, dword [ebp - 0x3c]
cmp edi, edx
je 0x40479e
mov eax, dword [ebp - 0x40]
cmp edx, eax
je 0x4046b8
xor ecx, ecx
call sym._GC_add_roots_inner.lto_priv.90
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x40], edi
jmp 0x404252
cmp byte [0x42e590], 0
je 0x40441a
mov dword [0x42c188], 1
mov eax, 0xfffffff8
mov esi, 7
mov ecx, 0x101
sub ecx, ebx
cmp ecx, eax
mov ebx, ecx
cmova ebx, eax
mov eax, 1
nop
lea ecx, [eax + esi]
shr ecx, 3
mov dword [eax*4 + 0x42c188], ecx
add eax, 1
cmp eax, ebx
jb 0x404690
jmp 0x40445e
lea ebx, [ebp - 0x34]
jmp 0x4044cd
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x40], edi
jmp 0x404252
cmp byte [ecx + 1], 0
je 0x4047c4
mov dword [esp + 4], esi
mov dword [esp], str.GC_Warning:_Bad_maximum_heap_size__s___ignoring_n
call dword [0x422830]
test edi, edi
je 0x4043e9
mov eax, edi
shr eax, 0xc
call sym._GC_expand_hp_inner.lto_priv.80
test eax, eax
je 0x404b68
add dword [0x42b3a4], edi
jmp 0x4043e9
mov dword [esp], sym._GC_exit_check.lto_priv.70
call sym._atexit
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [0x42b374]
test ecx, ecx
jne 0x404281
call sym._GC_scratch_alloc.constprop.52
mov dword [0x42b378], eax
call sym._GC_scratch_alloc.constprop.52
mov ebx, eax
mov dword [0x42b374], eax
mov eax, dword [0x42b378]
test eax, eax
je 0x404b44
test ebx, ebx
je 0x404b44
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._memset
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
mov dword [esp], ebx
call sym._memset
jmp 0x404281
mov dword [esp], str.GC_ENABLE_INCREMENTAL
call sub.msvcrt.dll_getenv
test eax, eax
jne 0x4040ce
jmp 0x404113
mov dword [ebp - 0x3c], esi
jmp 0x404252
shl edi, 0x14
mov dword [esp], str.GC_MAXIMUM_HEAP_SIZE
call sub.msvcrt.dll_getenv
mov esi, eax
test eax, eax
jne 0x40438b
jmp 0x4043e1
sub edx, 0x47
cmp dl, 0x26
ja case.0x4047d3.1
movzx edx, dl
jmp dword [edx*4 + 0x423b24]
mov dword [0x447dec], 2
jmp 0x4043dc
mov dword [esp], str.Page_size_not_multiple_of_HBLKSIZE
call sym._GC_default_on_abort.lto_priv.75
call dword [sym.imp.KERNEL32.dll_DebugBreak]
jmp 0x4040ea
call sym._GC_finish_collection.lto_priv.92
mov ecx, dword [ebp - 0x40]
test ecx, ecx
je 0x404600
mov eax, dword [ebp - 0x44]
call eax
mov edx, dword [0x42b370]
test edx, edx
je 0x404600
sub eax, dword [ebp - 0x48]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], 0x423a60
call sym._GC_log_printf
jmp 0x404600
mov eax, dword [ebp - 0x34]
jmp 0x4044cf
cmp dword [0x42b370], 2
mov dword [ebp - 0x50], 0
je 0x404b03
mov dword [ebp - 0x4c], 0x4226e0
mov eax, dword [ebp - 0x4c]
mov eax, dword [eax + 4]
lea esi, [eax + 0x404]
lea edi, [eax + 4]
mov dword [ebp - 0x54], esi
test eax, eax
je 0x404904
mov eax, dword [edi]
test eax, eax
je 0x4048f8
mov dword [ebp - 0x3c], edi
lea esi, [esi]
mov edx, eax
mov esi, dword [ebp - 0x3c]
shr edx, 0x16
mov ecx, dword [edx*4 + 0x446d94]
mov edx, eax
shr edx, 0xc
and edx, 0x3ff
mov edx, dword [ecx + edx*4]
mov ecx, dword [edx]
mov dword [esi], ecx
movzx ebx, byte [edx + 0xc]
mov ecx, dword [edx + 0x10]
lea esi, [ebx + ebx*4]
mov edi, dword [esi*4 + 0x4226e0]
mov ebx, ecx
mov esi, dword [esi*4 + 0x4226f0]
shr ebx, 3
lea ebx, [edi + ebx*4]
movzx edi, word [0x42b318]
mov word [edx + 0xe], di
mov edi, dword [ebx]
mov dword [esp], esi
mov dword [esp + 4], edi
call sym._GC_reclaim_generic.constprop.46
mov dword [ebx], eax
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax]
test eax, eax
jne 0x404890
mov edi, dword [ebp - 0x3c]
add edi, 4
cmp edi, dword [ebp - 0x54]
jne 0x404880
add dword [ebp - 0x4c], 0x14
mov eax, dword [ebp - 0x4c]
mov esi, 0x42271c
cmp esi, eax
jne 0x404866
cmp dword [0x42b370], 2
jne 0x404587
mov eax, dword [ebp - 0x44]
call eax
sub eax, dword [ebp - 0x50]
mov dword [esp], 0x423a30
mov dword [esp + 8], 0
mov dword [esp + 4], eax
call sym._GC_log_printf
jmp 0x404587
mov eax, dword [0x42b070]
test eax, eax
je 0x404a3c
mov esi, dword [0x42b070]
mov dword [ebp - 0x38], ebp
lea ebx, [ebp - 0x34]
mov eax, dword [ebp - 0x38]
mov dword [esp + 8], 0x1c
neg esi
mov dword [esp + 4], ebx
and esi, eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
cmp eax, 0x1c
je 0x40499f
mov dword [esp], 0x4237de
call sym._GC_default_on_abort.lto_priv.75
call dword [sym.imp.KERNEL32.dll_DebugBreak]
mov eax, dword [ebp - 0x20]
and ah, 0xfc
lea edx, [eax - 4]
and edx, 0xfffffffb
je 0x4049b5
sub eax, 0x40
and eax, 0xffffffbf
jne 0x4049c1
cmp dword [ebp - 0x24], 0x1000
jne 0x4049c1
add esi, dword [ebp - 0x28]
mov dword [0x42b060], esi
jmp 0x404069
mov dword [esp], str.GC_PRINT_STATS
call sub.msvcrt.dll_getenv
test eax, eax
je 0x403eb9
mov dword [0x42b370], 1
jmp 0x403eb9
mov edi, edx
jmp 0x40418e
call sym._GC_dump_named.constprop.48
jmp 0x4044f3
mov dword [esp], sym._GC_write_fault_handler_4.lto_priv.71
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
sub esp, 4
mov dword [0x42b058], eax
test eax, eax
je 0x404af4
mov edi, dword [0x42b370]
test edi, edi
je 0x404109
mov dword [esp], str.Replaced_other_UnhandledExceptionFilter_n
call sym._GC_log_printf
jmp 0x404109
mov dword [esp], 0x42b080
call ebx
mov eax, dword [0x42b084]
sub esp, 4
mov dword [0x42b070], eax
jmp 0x40495d
shl edi, 0xa
jmp 0x4047a9
shl edi, 0x1e
jmp 0x4047a9
shl eax, 0x14
cmp edi, eax
seta dl
jmp 0x4043c6
shl eax, 0xa
cmp edi, eax
seta dl
jmp 0x4043c6
shl eax, 0x1e
cmp edi, eax
seta dl
jmp 0x4043c6
mov eax, dword [0x42b3ec]
mov ebx, dword [0x42b384]
mov dword [0x42b420], 5
sub eax, 8
mov dword [0x42b3f4], eax
test ebx, ebx
je 0x404b10
mov eax, dword [0x42b380]
mov dword [esp + 8], 0x8000
mov dword [esp + 4], eax
mov eax, dword [0x42b37c]
mov dword [esp], eax
call sym._memcpy
jmp 0x404600
mov dword [esp], str.Using_GetWriteWatch___n
call sym._GC_log_printf
jmp 0x404109
mov dword [esp], str.Initializing_mprotect_virtual_dirty_bit_implementation_n
call sym._GC_log_printf
jmp 0x4040db
mov dword [0x42b058], 0xffffffff
jmp 0x404109
mov eax, dword [ebp - 0x44]
call eax
mov dword [ebp - 0x50], eax
jmp 0x40485f
mov eax, dword [0x42b378]
mov dword [esp + 8], 0x8000
mov dword [esp + 4], eax
mov eax, dword [0x42b374]
mov dword [esp], eax
call sym._memcpy
jmp 0x404aaf
mov dword [esp], 0x4239cc
call sym._GC_log_printf
jmp 0x404530
mov dword [esp], str.Insufficient_memory_for_black_list_n
call sym._GC_err_printf
mov dword [esp], 0
call sym._GC_default_on_abort.lto_priv.75
mov dword [esp], 1
call sym._exit
mov dword [esp], str.Cant_start_up:_not_enough_memory_n
jmp 0x404b4b
mov dword [esp], str.Insufficient_memory_for_GC_all_nils_n
jmp 0x404b4b