Function at 0x408320
Capabilities:
Accept command line arguments
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52d8d6
mov eax, dword fs:[0]
push eax
mov eax, 0x1f70
call fcn.005158f0
mov eax, dword [0x588e70]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x1f3c], esi
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
mov ecx, esi
call fcn.0042525c
xor ebx, ebx
push ebx
call fcn.0042758a
add esp, 4
mov dword [esi + 0xb8], ebx
call fcn.0041767f
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x408392
push 0x80004005
call fcn.004025a0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x1f28], eax
push ebx
lea ecx, [ebp - 0x1f20]
mov dword [ebp - 4], ebx
mov dword [ebp - 0x1f40], ebx
call fcn.0040bae0
push 0xbc
lea edx, [ebp - 0xec]
lea ecx, [ebp - 0x1f20]
push ebx
push edx
mov byte [ebp - 4], 1
mov dword [esi + 0x20], ecx
call fcn.005144f0
mov esi, dword [sym.imp.KERNEL32.dll_FindResourceA]
add esp, 0xc
push 0xa
push 0x67
push ebx
call esi
test eax, eax
je 0x40842d
push 0xa
push 0x40e
push ebx
call esi
cmp eax, ebx
jne 0x408408
push ebx
push ebx
push str.option_resource_load_failed
call fcn.00422eca
jmp 0x40842d
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ecx, 0x2f
mov esi, eax
lea edi, [ebp - 0xec]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [sym.imp.KERNEL32.dll_FindResourceA]
push 0xa
push 0x68
push 0
call esi
xor ecx, ecx
test eax, eax
setne cl
cmp dword [ebp - 0x5c], 0
mov dword [ebp - 0x1c], ecx
jne 0x408468
mov eax, 3
mov dword [ebp - 0x100], 0
mov dword [ebp - 0x58], 0x20000
mov dword [ebp - 0x54], 0x10002
mov word [ebp - 0x50], ax
jmp 0x408472
movzx ecx, word [ebp - 0x58]
mov dword [ebp - 0x100], ecx
cmp dword [ebp - 0x64], 1
jne 0x40847b
or ebx, 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
test eax, eax
jne 0x408489
xor ecx, ecx
jmp 0x408499
mov ecx, eax
lea esi, [ecx + 1]
mov edi, edi
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x408490
sub ecx, esi
push ecx
push eax
lea ecx, [ebp - 0x1f28]
call fcn.00402a20
cmp ebx, 0xffffffff
je 0x408fb3
nop
call fcn.0041767f
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x408388
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [ebp - 0x1f24], edi
mov esi, dword [ebp - 0x1f28]
mov eax, dword [esi - 0xc]
mov byte [ebp - 4], 2
test ebx, ebx
js 0x408f93
cmp ebx, eax
jge 0x408f93
push 0x2f
add ebx, esi
push ebx
call fcn.005156d5
add esp, 8
test eax, eax
je 0x408f93
sub eax, esi
cmp eax, 0xffffffff
je 0x408f93
push eax
lea ecx, [ebp - 0x1f50]
push ecx
lea ecx, [ebp - 0x1f28]
call fcn.004072d0
mov ecx, dword [eax]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
mov byte [ebp - 4], 3
cmp eax, esi
je 0x408587
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x408577
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x408577
push eax
call fcn.00403d60
mov edi, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x408566
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add edi, 0x10
mov dword [ebp - 0x1f28], edi
mov edi, dword [ebp - 0x1f24]
jmp 0x408587
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x1f28]
call fcn.00402a20
mov eax, dword [ebp - 0x1f50]
add eax, 0xfffffff0
mov byte [ebp - 4], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4085ad
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x1f28]
cmp dword [eax - 0xc], 0
jg 0x4085be
or ebx, 0xffffffff
jmp 0x4085da
push 0x20
push eax
call fcn.005156d5
add esp, 8
test eax, eax
jne 0x4085d2
or ebx, 0xffffffff
jmp 0x4085da
sub eax, dword [ebp - 0x1f28]
mov ebx, eax
mov ecx, dword [ebp - 0x1f28]
cmp dword [ecx - 0xc], 0
jg 0x4085eb
or esi, 0xffffffff
jmp 0x40860d
mov edx, dword [ebp - 0x1f28]
push 9
push edx
call fcn.005156d5
add esp, 8
test eax, eax
jne 0x408605
or esi, 0xffffffff
jmp 0x40860d
sub eax, dword [ebp - 0x1f28]
mov esi, eax
mov eax, dword [ebp - 0x1f28]
cmp dword [eax - 0xc], 0
jle 0x408626
mov ecx, eax
push 0x3b
push ecx
call fcn.005156d5
add esp, 8
cmp ebx, 0xffffffff
jne 0x408722
cmp esi, ebx
jne 0x408635
or esi, ebx
mov dword [ebp - 0x1f2c], esi
push 5
lea edx, [ebp - 0x1f7c]
push edx
lea ecx, [ebp - 0x1f28]
call fcn.004071d0
mov eax, dword [eax]
push str._lcd:
push eax
call fcn.005152bf
add esp, 8
test eax, eax
mov eax, dword [ebp - 0x1f7c]
sete bl
add eax, 0xfffffff0
mov byte [ebp - 4], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40868a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x40874b
mov ecx, dword [ebp - 0x1f28]
cmp dword [ecx - 0xc], 0
jle 0x4086be
mov edx, ecx
push 0x3b
push edx
call fcn.005156d5
add esp, 8
test eax, eax
je 0x4086be
sub eax, dword [ebp - 0x1f28]
cmp eax, 0xffffffff
jne 0x408743
mov dword [ebp - 0x1f2c], 0xffffffff
mov eax, dword [ebp - 0x1f28]
add eax, 0xfffffff0
lea esi, [edi - 0x10]
cmp eax, esi
je 0x40880e
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x4087f2
mov ecx, dword [eax]
cmp ecx, dword [esi]
jne 0x4087f2
push eax
call fcn.00403d60
add esp, 4
mov edi, eax
or edx, 0xffffffff
lock xadd dword [ebx], edx
dec edx
test edx, edx
jg 0x408714
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
add edi, 0x10
mov dword [ebp - 0x1f24], edi
jmp 0x408808
cmp esi, 0xffffffff
jne 0x40872e
mov esi, ebx
jmp 0x408635
cmp ebx, esi
jge 0x408635
mov esi, ebx
mov dword [ebp - 0x1f2c], ebx
jmp 0x40863b
mov esi, eax
mov dword [ebp - 0x1f2c], esi
cmp esi, 0xffffffff
je 0x4086c8
push esi
push 0
lea eax, [ebp - 0x1f70]
push eax
lea ecx, [ebp - 0x1f28]
call fcn.00407120
mov ecx, dword [eax]
lea eax, [ecx - 0x10]
lea esi, [edi - 0x10]
mov byte [ebp - 4], 5
cmp eax, esi
je 0x4087ca
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x4087b4
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x4087b4
push eax
call fcn.00403d60
mov edi, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x4087a9
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add edi, 0x10
mov dword [ebp - 0x1f24], edi
jmp 0x4087c4
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x1f24]
call fcn.00402a20
mov edi, dword [ebp - 0x1f24]
mov eax, dword [ebp - 0x1f70]
add eax, 0xfffffff0
mov byte [ebp - 4], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40880e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40880e
mov ecx, dword [ebp - 0x1f28]
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x1f24]
call fcn.00402a20
mov edi, dword [ebp - 0x1f24]
push 0x53eac8
push edi
call fcn.005154cd
add esp, 8
test eax, eax
jne 0x408839
cmp byte [ebp - 0x77], 1
jne 0x408f5f
mov dword [ebp - 0x8c], 1
jmp 0x408f5f
push 0x53eac4
push edi
call fcn.005154cd
add esp, 8
test eax, eax
jne 0x40885e
mov dword [ebp - 0xe8], 1
mov byte [ebp - 0x78], 0xe
jmp 0x408f5f
push str._nvm
push edi
call fcn.005154cd
add esp, 8
test eax, eax
jne 0x40887f
mov dword [ebp - 0xe4], 1
jmp 0x408f5f
push 0x53eab8
push edi
call fcn.005154cd
add esp, 8
test eax, eax
jne 0x4088a0
mov dword [ebp - 0x8c], 1
jmp 0x408f5f
push 0x53eab4
push edi
call fcn.005154cd
add esp, 8
test eax, eax
jne 0x4088d8
cmp dword [ebp - 0x84], 1
jne 0x408f5f
mov dword [ebp - 0xdc], 1
mov dword [ebp - 0x1f2c], 0xffffffff
jmp 0x408f5f
push 0x53eab0
push edi
call fcn.005154cd
add esp, 8
test eax, eax
jne 0x408909
cmp byte [ebp - 0x97], 1
jne 0x408f5f
mov dword [ebp - 0x1f40], 1
mov dword [ebp - 0x7c], eax
jmp 0x408f5f
push str._BGhp
push edi
call fcn.005154cd
add esp, 8
test eax, eax
jne 0x408927
mov byte [ebp - 0x97], 1
jmp 0x408f5f
push str._BGasus
push edi
call fcn.005154cd
add esp, 8
test eax, eax
jne 0x408945
mov byte [ebp - 0x97], 2
jmp 0x408f5f
push str._BGmemo
lea ecx, [ebp - 0x1f24]
call fcn.00406990
test eax, eax
jne 0x408965
mov byte [ebp - 0x97], 3
jmp 0x408f5f
push 5
lea eax, [ebp - 0x1f44]
push eax
lea ecx, [ebp - 0x1f24]
call fcn.004071d0
push str._lcd:
mov ecx, eax
mov byte [ebp - 4], 6
call fcn.00406960
test eax, eax
lea ecx, [ebp - 0x1f44]
sete bl
mov byte [ebp - 4], 2
call fcn.00402900
test bl, bl
je 0x408b68
lea ecx, [ebp - 0x1f34]
call fcn.00404890
lea ecx, [ebp - 0x1f60]
call fcn.00404890
cmp dword [edi - 0xc], 0
mov byte [ebp - 4], 8
jl 0x408a3b
push 0x53ea94
push edi
call fcn.0051560e
add esp, 8
test eax, eax
je 0x408a3b
sub eax, edi
cmp eax, 0xffffffff
je 0x408a3b
cmp dword [edi - 0xc], 0
jge 0x4089e9
or eax, 0xffffffff
jmp 0x408a02
push 0x53ea94
push edi
call fcn.0051560e
add esp, 8
test eax, eax
jne 0x408a00
or eax, 0xffffffff
jmp 0x408a02
sub eax, edi
push eax
push edi
lea ecx, [ebp - 0x1f34]
call fcn.00402a20
push 5
lea ecx, [ebp - 0x1f68]
push ecx
lea ecx, [ebp - 0x1f34]
call fcn.004072d0
push eax
lea ecx, [ebp - 0x1f34]
mov byte [ebp - 4], 9
call fcn.00404ec0
lea ecx, [ebp - 0x1f68]
jmp 0x408a65
push 5
lea edx, [ebp - 0x1f58]
push edx
lea ecx, [ebp - 0x1f24]
call fcn.004072d0
push eax
lea ecx, [ebp - 0x1f34]
mov byte [ebp - 4], 0xa
call fcn.00404ec0
lea ecx, [ebp - 0x1f58]
mov byte [ebp - 4], 8
call fcn.00402900
lea eax, [ebp - 0x1f20]
push eax
mov eax, dword [ebp - 0x1f34]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x1f74], esp
mov esi, esp
push eax
call fcn.00403d60
mov ecx, dword [ebp - 0x1f3c]
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.004074f0
mov esi, eax
test esi, esi
je 0x408b4d
lea ecx, [ebp - 0x1f30]
mov byte [ebp - 0xd4], 0
call fcn.00404890
mov byte [ebp - 4], 0xb
cmp esi, 1
jne 0x408acc
push str.no_option_specifiied
jmp 0x408b01
cmp esi, 2
jne 0x408ad8
push str.options_are_disordered
jmp 0x408b01
cmp esi, 3
jne 0x408ae4
push str.some_of_option_is_too_long
jmp 0x408b01
cmp esi, 4
jne 0x408af0
push str.FW_A_and_FW_B_are_the_same_model_name
jmp 0x408b01
cmp esi, 5
jne 0x408afc
push str.no_model_name_is_specified
jmp 0x408b01
push str.unspecified_error
lea ecx, [ebp - 0x1f30]
call fcn.00402b70
lea ecx, [ebp - 0x1f30]
push ecx
lea edx, [ebp - 0x1f78]
push str.Limited_crossdownload_setting_failed_n_n
push edx
call fcn.00407300
add esp, 0xc
mov eax, dword [eax]
push 0x10
push 0
push eax
mov byte [ebp - 4], 0xc
call fcn.00422eca
lea ecx, [ebp - 0x1f78]
call fcn.00402900
lea ecx, [ebp - 0x1f30]
call fcn.00402900
lea ecx, [ebp - 0x1f60]
call fcn.00402900
lea ecx, [ebp - 0x1f34]
call fcn.00402900
jmp 0x408f5f
push 4
lea eax, [ebp - 0x1f48]
push eax
lea ecx, [ebp - 0x1f24]
call fcn.004071d0
push str._rv:
mov ecx, eax
mov byte [ebp - 4], 0xd
call fcn.00406960
test eax, eax
lea ecx, [ebp - 0x1f48]
sete bl
mov byte [ebp - 4], 2
call fcn.00402900
test bl, bl
je 0x408c2c
lea ecx, [ebp - 0x1f38]
call fcn.00404890
push 4
lea ecx, [ebp - 0x1f4c]
push ecx
lea ecx, [ebp - 0x1f24]
mov byte [ebp - 4], 0xe
call fcn.004072d0
push eax
lea ecx, [ebp - 0x1f38]
mov byte [ebp - 4], 0xf
call fcn.00404ec0
lea ecx, [ebp - 0x1f4c]
mov byte [ebp - 4], 0xe
call fcn.00402900
mov eax, dword [ebp - 0x1f38]
lea edx, [ebp - 0x1f20]
push edx
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x1f74], esp
mov esi, esp
push eax
call fcn.00403d60
mov ecx, dword [ebp - 0x1f3c]
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.00407f10
lea ecx, [ebp - 0x1f38]
call fcn.00402900
jmp 0x408f5f
push 5
lea eax, [ebp - 0x1f54]
push eax
lea ecx, [ebp - 0x1f24]
call fcn.004071d0
push str._nuc:
mov ecx, eax
mov byte [ebp - 4], 0x10
call fcn.00406960
test eax, eax
lea ecx, [ebp - 0x1f54]
sete bl
mov byte [ebp - 4], 2
call fcn.00402900
test bl, bl
je 0x408c9a
push 5
lea ecx, [ebp - 0x1f5c]
push ecx
lea ecx, [ebp - 0x1f24]
call fcn.004072d0
mov eax, dword [eax]
push eax
call fcn.005158e1
add esp, 4
lea ecx, [ebp - 0x1f5c]
mov byte [ebp - 0x78], al
call fcn.00402900
jmp 0x408f5f
push 6
lea edx, [ebp - 0x1f64]
push edx
lea ecx, [ebp - 0x1f24]
call fcn.004071d0
push str._toid:
mov ecx, eax
mov byte [ebp - 4], 0x11
call fcn.00406960
test eax, eax
lea ecx, [ebp - 0x1f64]
sete bl
mov byte [ebp - 4], 2
call fcn.00402900
lea ecx, [ebp - 0x1f24]
test bl, bl
je 0x408d08
push 6
lea eax, [ebp - 0x1f6c]
push eax
call fcn.004072d0
mov eax, dword [eax]
push eax
call fcn.005158e1
add esp, 4
lea ecx, [ebp - 0x1f6c]
mov byte [ebp - 0x6c], al
call fcn.00402900
jmp 0x408f5f
push str._arw
call fcn.00406990
test eax, eax
jne 0x408d25
mov dword [ebp - 0x84], 1
jmp 0x408f5f
push str._exd
lea ecx, [ebp - 0x1f24]
call fcn.00406990
test eax, eax
jne 0x408d48
mov dword [ebp - 0x94], 1
jmp 0x408f5f
push str._svd
lea ecx, [ebp - 0x1f24]
call fcn.00406990
test eax, eax
jne 0x408d6b
mov dword [ebp - 0xe0], 1
jmp 0x408f5f
push str._asd
lea ecx, [ebp - 0x1f24]
call fcn.00406990
test eax, eax
jne 0x408d8e
mov dword [ebp - 0x88], 1
jmp 0x408f5f
push str._wsd
lea ecx, [ebp - 0x1f24]
call fcn.00406990
test eax, eax
jne 0x408dae
mov byte [ebp - 0xec], 1
jmp 0x408f5f
push str._scb
lea ecx, [ebp - 0x1f24]
call fcn.00406990
test eax, eax
jne 0x408dce
mov dword [ebp - 0x80], 1
jmp 0x408f5f
push 0x53e97c
lea ecx, [ebp - 0x1f24]
call fcn.00406990
test eax, eax
jne 0x408dfa
cmp dword [ebp - 0x1f40], eax
jne 0x408f5f
mov dword [ebp - 0x7c], 1
jmp 0x408f5f
push str._crf:LG
lea ecx, [ebp - 0x1f24]
call fcn.00406990
test eax, eax
jne 0x408e17
mov byte [ebp - 0x77], 1
jmp 0x408f5f
push str._crf:ASUS
lea ecx, [ebp - 0x1f24]
call fcn.00406990
test eax, eax
jne 0x408e34
mov byte [ebp - 0x77], 2
jmp 0x408f5f
push str._stayClosed
lea ecx, [ebp - 0x1f24]
call fcn.00406990
test eax, eax
jne 0x408e5e
cmp byte [ebp - 0x97], 1
jne 0x408f5f
mov byte [ebp - 0x6c], 2
jmp 0x408f5f
push str._oea
lea ecx, [ebp - 0x1f24]
call fcn.00406990
test eax, eax
jne 0x408e7e
mov dword [ebp - 0x60], 1
jmp 0x408f5f
push str._adu
lea ecx, [ebp - 0x1f24]
call fcn.00406990
test eax, eax
jne 0x408e9e
mov dword [ebp - 0x70], 1
jmp 0x408f5f
push 0x53e948
lea ecx, [ebp - 0x1f24]
call fcn.00406990
test eax, eax
je 0x408f56
push 0x53e944
lea ecx, [ebp - 0x1f24]
call fcn.00406990
test eax, eax
je 0x408f56
push 0x53e940
lea ecx, [ebp - 0x1f24]
call fcn.00406990
test eax, eax
je 0x408f56
push str._nas
lea ecx, [ebp - 0x1f24]
call fcn.00406990
test eax, eax
jne 0x408eff
mov dword [ebp - 0x48], 1
jmp 0x408f5f
push str._fot
lea ecx, [ebp - 0x1f24]
call fcn.00406990
test eax, eax
jne 0x408f1c
mov dword [ebp - 0x44], 1
jmp 0x408f5f
push str._nld
lea ecx, [ebp - 0x1f24]
call fcn.00406990
test eax, eax
jne 0x408f39
mov dword [ebp - 0x40], 1
jmp 0x408f5f
push str._nbf
lea ecx, [ebp - 0x1f24]
call fcn.00406990
test eax, eax
jne 0x408f5f
mov dword [ebp - 0x3c], 1
jmp 0x408f5f
cmp byte [ebp - 0x97], 1
je 0x408fd5
lea eax, [edi - 0x10]
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408f7f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [ebp - 0x1f2c], 0xffffffff
je 0x408fb3
mov ebx, dword [ebp - 0x1f2c]
jmp 0x4084b0
lea eax, [edi - 0x10]
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408fb3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
cmp dword [ebp - 0xdc], eax
je 0x409005
cmp dword [ebp - 0x8c], eax
je 0x409005
lea ecx, [ebp - 0x1f20]
call fcn.00418369
jmp 0x409014
push 0
push 0
push str._Option_List__n____or__h_:_Help_n__f_:_Update_F_W_regardless_of_F_W_version_n__stayClosed_:_Do_not_open_tray_during_update_n_n_Error_Levels__n_0_:_Success__no_reboot_required._n_259_:_Failed_to_install_firmware._n_3010_:_Success__reboot_required.
call fcn.00422eca
lea eax, [edi - 0x10]
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409047
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x409047
lea ecx, [ebp - 0x1f20]
push ecx
call fcn.004073d0
add esp, 4
cmp byte [ebp - 0x77], 0
mov eax, dword [ebp - 0x100]
mov edx, dword [ebp - 0x1f3c]
mov dword [edx + 0xb8], eax
je 0x409047
movzx ecx, word [ebp - 0x58]
xor edx, edx
cmp eax, ecx
sete dl
lea eax, [ebp - 0x1f20]
push edx
push eax
call fcn.004070a0
add esp, 8
lea ecx, [ebp - 0x1f20]
mov byte [ebp - 4], 0
call fcn.00406dd0
mov eax, dword [ebp - 0x1f28]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov dword [ebp - 4], edx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40907b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005144d7
mov esp, ebp
pop ebp
ret