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

Disassembly:
sub esp, 0x58
mov eax, dword [0x698b9c]
xor eax, esp
mov dword [esp + 0x54], eax
push ebx
push ebp
mov ebp, dword [esp + 0x64]
cmp dword [ebp + 0x2dc], 0
push esi
mov esi, ecx
push edi
mov dword [esp + 0x14], ebp
mov dword [esp + 0x20], esi
mov edi, edx
je 0x47a02d
test esi, esi
je 0x47a02d
mov eax, dword [esi]
test eax, eax
je 0x47a02d
mov eax, dword [eax + 0xcc]
mov ecx, dword [esi + 4]
mov ecx, dword [ecx + 0x218]
mov ebx, dword [edi + 0x20]
shr eax, 1
mov dword [esp + 0x40], ebx
cmp eax, ecx
jb 0x479c8f
mov eax, ecx
cmp byte [edi + 0x61], 1
je 0x479c9d
cmp ebx, eax
jb 0x47a02d
push ebx
call fcn.005c052e
add esp, 4
mov dword [esp + 0x18], eax
test eax, eax
je 0x47a02d
cmp dword [esp + 0x70], 0
jne 0x479cc6
add ebp, 0x298
push ebp
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi]
mov esi, dword [edi + 0x34]
mov dword [esp + 0x44], eax
test esi, esi
je 0x479d7f
lea edx, [eax + 0xc8]
add eax, 0xd0
mov dword [esp + 0x10], edx
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 0xc]
mov ecx, dword [esp + 0x10]
mov ebp, dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
neg eax
push eax
push ecx
call ebp
test eax, eax
jge 0x479d0b
mov edx, dword [esp + 0x10]
mov dword [edx], 0
mov eax, dword [esp + 0x1c]
push 0xffffff00
push eax
call ebp
test eax, eax
jge 0x479d25
mov ecx, dword [esp + 0x1c]
mov dword [ecx], 0
cmp byte [edi + 0x60], 0
jne 0x479d73
mov eax, dword [edi + 0x40]
test eax, eax
je 0x479d73
mov edx, dword [esi + 0xc]
neg edx
push edx
add eax, 0x358
push eax
call ebp
test eax, eax
jge 0x479d51
mov eax, dword [edi + 0x40]
mov dword [eax + 0x358], 0
mov ecx, dword [edi + 0x40]
push 0xffffff00
add ecx, 0x360
push ecx
call ebp
test eax, eax
jge 0x479d73
mov edx, dword [edi + 0x40]
mov dword [edx + 0x360], 0
mov esi, dword [esi]
test esi, esi
jne 0x479cea
jmp 0x479d85
mov ebp, dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
mov eax, dword [esp + 0x18]
mov esi, dword [edi + 0x34]
mov dword [esp + 0x10], eax
test ebx, ebx
jle 0x479dc1
mov ebp, dword [esi + 0xc]
cmp ebp, ebx
jl 0x479d9d
mov ebp, ebx
mov ecx, dword [esi + 8]
mov edx, dword [esp + 0x10]
push ebp
push ecx
push edx
call fcn.005bfdd0
add dword [esp + 0x1c], ebp
mov esi, dword [esi]
sub ebx, ebp
add esp, 0xc
test ebx, ebx
jg 0x479d94
mov ebp, dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
mov cx, word [edi + 0x1c]
mov dx, word [edi + 2]
xor eax, eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov ax, word [edi]
mov word [esp + 0x24], ax
mov eax, dword [edi + 4]
mov dword [esp + 0x2c], eax
mov eax, dword [edi + 8]
mov dword [esp + 0x38], eax
xor eax, eax
mov word [esp + 0x26], cx
mov ecx, dword [edi + 0x10]
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov eax, dword [edi + 0x30]
cmp word [eax + 0x74], 0x7b
mov word [esp + 0x28], dx
mov edx, dword [edi + 0x14]
mov dword [esp + 0x30], ecx
mov ecx, dword [edi + 0x18]
mov dword [esp + 0x34], edx
mov dword [esp + 0x3c], ecx
je 0x479e65
mov edx, dword [eax + 0x74]
mov ecx, dword [eax + 0x78]
mov dword [esp + 0x48], edx
mov edx, dword [eax + 0x7c]
mov eax, dword [eax + 0x80]
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], edx
mov dword [esp + 0x54], eax
jmp 0x479e73
mov ecx, dword [eax + 0x74]
mov edx, dword [eax + 0x78]
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], edx
cmp byte [edi + 0x61], 1
mov dword [esp + 0x10], 0
jne 0x479e89
mov dword [esp + 0x10], 8
mov eax, pe_nt_image_headers32
test word [edi + 0x5e], ax
je 0x479e9c
or dword [esp + 0x10], 0x2000
mov eax, dword [edi + 0x34]
call fcn.004653c0
xor ebx, ebx
mov dword [edi + 0x34], ebx
mov dword [edi + 0x38], ebx
mov dword [edi + 0x20], ebx
cmp byte [edi + 0x61], bl
je 0x479f97
mov eax, dword [edi + 0x44]
mov ecx, dword [edi + 0x48]
cmp eax, ebx
je 0x479ec7
mov dword [eax + 0x48], ecx
jmp 0x479ed4
mov edx, dword [esp + 0x20]
mov eax, dword [edx + 4]
mov dword [eax + 0xa4], ecx
mov eax, dword [edi + 0x44]
mov edx, dword [edi + 0x48]
mov dword [edx], eax
mov eax, dword [edi + 0x30]
mov byte [edi + 0x67], 0
cmp eax, ebx
je 0x479f82
or esi, 0xffffffff
push esi
add eax, 0x150
push eax
call ebp
cmp eax, 1
jne 0x479f82
mov ecx, dword [edi + 0x30]
mov eax, dword [ecx + 0x70]
cmp eax, ebx
je 0x479f34
cmp dword [eax + 0xc], 1
jg 0x479f23
add dword [eax + 0xc], esi
cmp dword [eax + 0xc], ebx
jg 0x479f28
push eax
call fcn.005c05f8
add esp, 4
jmp 0x479f28
mov ecx, eax
add dword [ecx + 0xc], esi
mov ecx, dword [edi + 0x30]
mov dword [ecx + 0x70], ebx
mov edx, dword [edi + 0x30]
mov dword [edx + 0x70], ebx
mov eax, dword [edi + 0x30]
cmp byte [eax + 0x1b3], 0
je 0x479f54
mov esi, dword [eax + 0x90]
call fcn.00466100
mov eax, dword [edi + 0x30]
mov dword [eax + 0x90], ebx
mov ecx, dword [edi + 0x30]
mov byte [ecx + 0x1b3], 0
mov eax, dword [edi + 0x30]
mov edx, 0xfffe
and word [eax + 0x1a4], dx
mov eax, dword [edi + 0x30]
push eax
call fcn.005c05f8
add esp, 4
push 0xffffffffffffffff
push 0x69f39c
call ebp
push edi
mov dword [edi + 0x30], ebx
call fcn.005c05f8
add esp, 4
push 0xffffffffffffffff
push 0x69f3a4
call ebp
mov esi, dword [esp + 0x20]
push 1
lea ebx, [esi + 0x460]
push ebx
call ebp
lea ebp, [esi + 0x57c]
mov esi, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push ebp
call esi
cmp dword [esp + 0x70], 0
jne 0x479fc9
mov ecx, dword [esp + 0x14]
add ecx, 0x298
push ecx
call esi
mov edx, dword [esp + 0x14]
mov eax, dword [edx + 0x2d8]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x40]
push eax
mov eax, dword [esp + 0x1c]
push ecx
sub esp, 0x1c
mov edi, esp
push edx
mov edx, dword [esp + 0x3c]
push eax
mov eax, dword [edx + 0x2dc]
mov ecx, 7
lea esi, [esp + 0x50]
rep movsd dword es:[edi], dword [esi]
sub esp, 0x1c
mov edi, esp
mov ecx, 7
lea esi, [esp + 0x90]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x8c]
push ecx
call eax
add esp, 0x4c
push ebp
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0xffffffffffffffff
push ebx
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
mov ecx, dword [esp + 0x64]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.005bfcb8
add esp, 0x58
ret