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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x4c
mov eax, dword [0x46800c]
xor ebx, ebx
xor eax, ebp
cmp dword [ebp + 0xc], 0
mov dword [ebp - 0x10], eax
je 0x4081f7
mov esi, dword [ebp + 8]
test esi, esi
je 0x4081f7
cmp dword [ebp + 0x18], 0
je 0x4081f7
mov eax, dword [ebp + 0x18]
mov edx, dword [ebp + 0x14]
mov ebx, dword [ebp + 0x10]
mov ecx, 0x20
lea edi, [eax + 0x10]
xor eax, eax
add ebx, edx
rep stosd dword es:[edi], eax
mov edi, dword [ebp + 0x18]
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x50], ebx
mov dword [edi], ebx
xor ebx, ebx
sub ecx, edx
mov dword [edi + 4], edx
mov dword [edi + 0xc], ebx
mov dword [edi + 8], ebx
jbe 0x408164
add esi, edx
cmp ecx, 0x15
mov edi, 0x14
mov eax, 0x14
mov dword [ebp - 0x4c], ecx
cmovl edi, ecx
xor ebx, ebx
sub eax, edi
cmp edi, 0x13
lea ecx, [ebp + edi - 0x24]
cmova eax, ebx
push eax
push ebx
push ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x24]
push edi
mov edi, eax
push esi
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x34], ebx
mov ebx, dword [ebp - 0x4c]
cmp byte [edi], 0
jne 0x40810a
cmp ebx, 4
jb 0x40810a
mov eax, dword [0x468514]
and eax, 1
je 0x40810a
cmp byte [ebp - 0x23], 0
jne 0x40810a
cmp byte [ebp - 0x22], 0
jne 0x40810a
cmp byte [ebp - 0x21], 0
je 0x40859d
lea eax, [ebp - 0x34]
lea ecx, [ebp - 0x30]
push eax
push ecx
push 0
push ebx
push edi
call fcn.00406a30
add esp, 0x14
cmp eax, 0xffffffff
je 0x408186
mov ecx, ebx
sub ecx, eax
jb 0x408186
mov esi, dword [ebp - 0x30]
cmp dword [esi + 4], 0
je 0x408186
mov dword [ebp - 0x54], eax
mov eax, dword [0x468514]
mov edx, dword [ebp - 0x34]
mov edi, dword [ebp + 0x18]
mov dword [ebp - 0x44], ecx
test al, 2
mov dword [ebp - 0x40], edx
jne 0x40820b
test dl, 0x10
sete cl
add cl, cl
add cl, 2
test dl, 0x20
sete dl
jmp 0x40821e
mov ecx, dword [0x49afbc]
test ecx, ecx
je 0x4081f7
mov esi, dword [0x49afc0]
call dword [section..00cfg]
push esi
push dword [ebp - 0x50]
push 0
jmp 0x4081f2
mov eax, dword [ebp + 0x18]
mov dword [eax + 0x6c], 0x64696c
mov dword [eax + 0x68], 0x61766e69
mov eax, dword [eax + 0x78]
test eax, eax
je 0x4081b3
mov esi, dword [sym.imp.mozglue.dll_free]
mov edi, dword [eax + 0x60]
push eax
call esi
add esp, 4
test edi, edi
mov eax, edi
jne 0x4081a4
mov ecx, dword [ebp + 0x18]
xor eax, eax
mov dword [ecx + 0x78], eax
mov dword [ecx + 0x7c], eax
mov dword [ecx + 0x80], eax
mov byte [ecx + 0x28], 1
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
mov al, byte [ebp - 0x24]
mov byte [ecx + 0x14], al
mov ecx, dword [0x49afbc]
xor ebx, ebx
test ecx, ecx
je 0x4081f7
mov esi, dword [0x49afc0]
call dword [section..00cfg]
push esi
push dword [ebp - 0x50]
push 2
call ecx
add esp, 0xc
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0044d830
mov eax, ebx
add esp, 0x4c
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, edx
and edx, 0x20
and ecx, 0x10
shr edx, 5
shr ecx, 4
add cl, cl
add cl, 2
add dl, dl
mov byte [edi + 0x2a], cl
add dl, 2
test al, 4
mov byte [edi + 0x29], dl
je 0x408238
cmp byte [esi + 0x2c], 0
je 0x408238
lea eax, [esi + 0x2c]
jmp 0x40823b
lea eax, [esi + 0x1c]
lea ecx, [edi + 0x68]
push 0x10
push eax
mov dword [ebp - 0x58], ecx
push ecx
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
add esp, 0xc
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x3c], esi
movzx ecx, ax
and eax, 0xf
cmovne eax, ecx
test al, 4
mov dword [edi + 0x44], eax
je 0x40828d
lea esi, [edi + 0x48]
push esi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
mov ecx, 0x20
sub ecx, eax
push ecx
push str.lock
push esi
mov esi, dword [ebp - 0x3c]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncat]
add esp, 0xc
mov eax, dword [edi + 0x44]
test al, 2
jne 0x4082b0
test al, 1
je 0x4082d6
lea esi, [edi + 0x48]
push esi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
mov ecx, 0x20
sub ecx, eax
push ecx
push str.repz
jmp 0x4082c9
lea esi, [edi + 0x48]
push esi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
mov ecx, 0x20
sub ecx, eax
push ecx
push str.repnz
push esi
mov esi, dword [ebp - 0x3c]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncat]
add esp, 0xc
mov eax, dword [ebp - 0x54]
mov ecx, edi
mov edx, esi
lea edi, [ebp + eax - 0x24]
call fcn.00408610
mov edx, dword [ebp - 0x44]
test edx, edx
je 0x4082f1
mov al, byte [edi]
jmp 0x4082f3
xor eax, eax
movzx eax, al
mov ecx, edi
mov ebx, edx
mov dword [ebp - 0x38], eax
push eax
push dword [ebp - 0x40]
mov esi, dword [ebp - 0x3c]
push dword [esi + 0xc]
push dword [esi + 0x3c]
mov eax, dword [ebp + 0x18]
push eax
call fcn.00407650
add esp, 0x14
add edi, eax
sub ebx, eax
mov dword [ebp - 0x48], eax
mov ecx, edi
mov edx, ebx
push dword [ebp - 0x38]
push dword [ebp - 0x40]
push dword [esi + 0x10]
push dword [esi + 0x40]
push dword [ebp + 0x18]
call fcn.00407650
add esp, 0x14
add edi, eax
sub ebx, eax
mov dword [ebp - 0x44], eax
mov ecx, edi
mov edi, dword [ebp + 0x18]
mov edx, ebx
push dword [ebp - 0x38]
mov ebx, dword [ebp - 0x40]
push ebx
push dword [esi + 0x14]
push dword [esi + 0x44]
push edi
call fcn.00407650
add esp, 0x14
mov edx, dword [esi + 0x4c]
mov ecx, edi
mov dword [ebp - 0x38], eax
call fcn.004068a0
test bl, 3
je 0x40837a
mov ecx, edi
mov edx, 0x29
call fcn.004068a0
cmp byte [edi + 0x2a], 2
mov ebx, dword [ebp - 0x4c]
jne 0x408421
mov eax, dword [ebp + 0x18]
mov edi, dword [eax + 0x78]
test edi, edi
je 0x408421
cmp dword [edi], 1
jne 0x408419
cmp dword [edi + 0x1c], 4
jne 0x408419
test byte [edi + 0x18], 1
je 0x408419
mov edx, dword [edi + 0x20]
lea eax, [edx + 7]
cmp eax, 0x5c
ja 0x408419
add edx, 8
lea eax, [edi + 0x10]
xor ecx, ecx
mov ebx, edx
mov dword [eax + 4], ecx
mov dword [eax], ecx
mov dword [eax + 0xc], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0x14], ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 0x18], ecx
lea ecx, [edx*4]
lea esi, [ecx + ecx*4 + 0x49a3e4]
push 8
push esi
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
add esp, 0xc
mov eax, dword [esi - 8]
mov dword [edi + 0x18], eax
mov eax, dword [esi - 0xc]
mov dword [edi + 0x1c], eax
mov eax, dword [esi - 4]
test eax, eax
je 0x408413
movzx ecx, byte [eax + eax + 0x44f564]
movzx eax, byte [eax + eax + 0x44f565]
mov dword [edi + 0x24], ecx
mov dword [edi + 0x28], eax
mov dword [edi + 0x20], ebx
mov ebx, dword [ebp - 0x4c]
mov edi, dword [edi + 0x60]
jmp 0x40838d
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x30]
add edx, dword [ebp - 0x54]
add edx, dword [ebp - 0x44]
add edx, dword [ebp - 0x38]
test byte [eax + 7], 0x20
jne 0x40843d
mov edi, dword [ebp + 0x18]
mov eax, edx
jmp 0x40849b
mov ecx, ebx
lea esi, [ebp - 0x2c]
mov dword [ebp - 0x48], edx
lea edi, [ebp - 0x28]
sub ecx, edx
lea edx, [ebp + edx - 0x24]
mov dword [esi], 0
push esi
push edi
push dword [eax]
push ecx
push edx
call fcn.00406a30
add esp, 0x14
cmp eax, 0xffffffff
je 0x40851f
mov eax, dword [ebp - 0x28]
cmp dword [eax + 4], 0
je 0x40851f
add eax, 0x1c
push 0x10
push eax
push dword [ebp - 0x58]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
add esp, 0xc
mov edi, dword [ebp + 0x18]
mov edx, dword [ebp - 0x28]
mov ecx, edi
call fcn.00408610
mov eax, dword [ebp - 0x48]
inc eax
test eax, eax
je 0x408555
cmp eax, ebx
mov byte [edi + 0x28], al
jle 0x408588
mov ecx, dword [0x49afbc]
test ecx, ecx
je 0x4084cf
mov esi, dword [0x49afc0]
call dword [section..00cfg]
push esi
push dword [ebp - 0x50]
push 1
call ecx
add esp, 0xc
mov dword [edi + 0x6c], 0x64696c
mov dword [edi + 0x68], 0x61766e69
mov eax, dword [edi + 0x78]
test eax, eax
je 0x4084f9
mov esi, dword [sym.imp.mozglue.dll_free]
mov edi, dword [eax + 0x60]
push eax
call esi
add esp, 4
test edi, edi
mov eax, edi
jne 0x4084ea
mov ecx, dword [ebp + 0x18]
xor ebx, ebx
mov dword [ecx + 0x78], ebx
mov dword [ecx + 0x7c], ebx
mov dword [ecx + 0x80], ebx
mov byte [ecx + 0x28], 1
mov dword [ecx + 8], ebx
mov dword [ecx + 0xc], ebx
mov al, byte [ebp - 0x24]
mov byte [ecx + 0x14], al
jmp 0x4081f7
mov eax, dword [ebp + 0x18]
mov dword [eax + 0x6c], 0x64696c
mov dword [eax + 0x68], 0x61766e69
mov eax, dword [eax + 0x78]
test eax, eax
je 0x4081b3
mov esi, dword [sym.imp.mozglue.dll_free]
mov edi, dword [eax + 0x60]
push eax
call esi
add esp, 4
test edi, edi
mov eax, edi
jne 0x408541
jmp 0x4081b3
mov dword [edi + 0x6c], 0x64696c
mov dword [edi + 0x68], 0x61766e69
mov eax, dword [edi + 0x78]
test eax, eax
je 0x4081b3
mov esi, dword [sym.imp.mozglue.dll_free]
mov edi, dword [eax + 0x60]
push eax
call esi
add esp, 4
test edi, edi
mov eax, edi
jne 0x408574
jmp 0x4081b3
mov ebx, eax
add edi, 0x14
push eax
lea eax, [ebp - 0x24]
push eax
push edi
call sub.VCRUNTIME140.dll_memcpy
jmp 0x4081f4
mov ecx, dword [ebp + 0x18]
xor eax, eax
mov dword [ecx + 0x6c], 0x64696c
mov dword [ecx + 0x68], 0x61766e69
mov dword [ecx + 0x78], eax
mov dword [ecx + 0x7c], eax
mov dword [ecx + 0x80], eax
mov byte [ecx + 0x28], 1
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
mov byte [ecx + 0x14], 0
jmp 0x4081d4